How jQuery detects browsers
This article will explain in detail how jQuery detects browsers. Xiaobian thinks it is quite practical, so share it with you for a reference. I hope you can gain something after reading this article.
detect browser
Note: In version 1.4 of jQuery,$.support replaces the $.browser variable $(document).ready(function() { // Target Firefox 2 and above if ($.browser.mozilla && $.browser.version >= "1.8" ){ // do something } // Target Safari if( $.browser.safari ){ // do something } // Target Chrome if( $.browser.chrome){ // do something } // Target Camino if( $.browser.camino){ // do something } // Target Opera if( $.browser.opera){ // do something } // Target IE6 and below if ($.browser.msie && $.browser.version 6){ // do something } }); About "jQuery how to detect browsers" This article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.