If you love jQuery like I do then here is the simple snippet that you can use to detect browser.
if (jQuery.browser.msie) { // do sth.}
For detecting a specific version of Internet Explorer only:
// Select Internet Explorer above 6if (jQuery.browser.msie && jQuery.browser.version > 6) { // do sth.} // Select Internet Explorer 7 and belowif (jQuery.browser.msie && jQuery.browser.version <= 7) { // do sth.} // Select just Internet Explorer 6if (jQuery.browser.msie && jQuery.browser.version == '6.0') { // do sth.} // Select just Internet Explorer 7if (jQuery.browser.msie && jQuery.browser.version == '7.0') { // do sth.} // Select just Internet Explorer 8if (jQuery.browser.msie && jQuery.browser.version == '8.0') { // do sth.} // Select just Internet Explorer 9if (jQuery.browser.msie && jQuery.browser.version == '9.0') { // do sth.}
No comments:
Post a Comment