检测firefox浏览器使用jQuery [英] Detect firefox browser with jquery
本文介绍了检测firefox浏览器使用jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我面临的一个问题是我的CSS是有一些bug,当Firefox是低于2.0。
我想检测浏览器来解决我的CSS错误。
I facing a problem is my css is have a some bug when firefox is lower than 2.0. I would like to detect the browser to fix my css bug.
这是我的code:
$(document).ready (
function() {
if ( $.browser.mozilla == true && $.browser.version < '3.0' ) {
$('img.frameMargin').css('margin-left','35px');
}
}
);
但是,这code似乎是行不通的。
But this code seem like not work.
感谢提前。
推荐答案
您将不得不这样做...
You would have to do this...
$.browser.version < '1.9'
2的FireFox应返回1.8 ... ...所以这将成为过去。
FireFox 2 should return 1.8... so this will pass.
这篇关于检测firefox浏览器使用jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文