How to detect IE7 with jQuery possibly using jQuery.browser?
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Include empty value fields in jQuery .serialize()
- Disable Browser onUnload on certain links?
- how to get selected text from iframe with javascri
All other things considered:
Should work. Whether or not it is the right way to go about things is another question.
See $.browser. This feature has been deprecated and you should consider $.support instead.
To answer the question, this is a rock solid technique primarily for use in stylesheets but can also be used easily to check browser version, or best still part of a selector.
Use the following markup (from HTML5 Boilerplate)
Use a selector with hasClass in jQuery
And use as part of a normal selector in css
Got a method
-- update
Please note that $.browser is removed from jQuery 1.9