Get the App
SLTechnology News&Howtos  ›  Development  › 

How jQuery detects browsers

Shulou Source: shulou.com Published: 2022-06-01 04:01:18 10月31日 Update

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.

Tags: Browsers tests browsing articles more good practical content variables articles versions knowledge references help related Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Huawei MariaDB macOS NVidia