When using the following code to detect browser version of jquery: problem, in the detection of IE browser, if the version is IE11, the return value of $.browser.msie will appear is false,$. The return value of Browser.mozilla is true, which means that IE11 is detected as Firefox.The final method of judging IE browser with!! Window. ActiveXObject | | The "ActiveXObject" in Window method.function Judgebroswe
Method for detecting element occurrences.Although it is based on JQuery, but the code is very concise, can be modified into a pure JS version.TextJQuery.fn.wait =function(Func, Times, Interval) {var _times = Times | | -1,100 times _interval = Interval | |20,20 ms Each _self =This, _selector =This.selector,Selector _iintervalid;//Timer ID if (this.length) {//if already acquired, execute function func func.call (this);} else {_iintervalid = setinterval
$ (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 Do something
}
Target anything above IE6
if ($.brow
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.