Detect firefox browser with jquery

前端 未结 4 1553
臣服心动
臣服心动 2021-02-13 11:14

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.

This is my code:

$(         


        
4条回答
  •  借酒劲吻你
    2021-02-13 11:48

    On my machine (Mac OS X 10.6), $.browser.version in Firefox 4 reports "2.0". So, it looks like your code is valid, but there's an issue with JQuery.

    From the http://api.jquery.com/jQuery.browser/:

    We recommend against using this property; please try to use feature detection instead (see jQuery.support).

    If you need reliable browser detection in Javascript, check out one of the many tutorials online (such as this one).

提交回复
热议问题