开发者

How do i use jquery to find out which browser client is using

Based on that i can add CSS feature to one element of my page. C开发者_StackOverflow中文版an anybody please give an example?


You can use $.browser. However, this is highly discouraged, since it doesn't cope with new or rare browsers. As the docs note:

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

$.browser will be removed from future versions of jQuery.

If you give us more information, we may be able to suggest a better solution.

EDIT: As the docs say, you can use flags like $.browser.webkit (true for webkit) or $.browser.ie, and get the version from $.browser.version.


You can use the jQuery.browser or $.browser property. Check this URL: http://api.jquery.com/jQuery.browser/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜