I am using Typekit.com to display cufonts on a site, however, it is only compatible with mobile browsers >= 4.2 iOS. I have used jQuery to test if the visitor is using iOS and to display specific content based on that in the past (no sweat), but I’m having a great deal of trouble figuring out how to be more specific and revise the CSS ONLY IF the version is LESS than iOS version 4.2. Can’t seem to figure this out… any help?
Share
Put your 4.2+ styles into one stylesheet. Put your <4.2 styles into another. Check the version and add the appropriate stylesheet to the
<head>. You’d need to test older user agent strings, but this should work with most. The function returns0(if it can’t determine or if it’s not iOS) as a fallback to the “old” stylesheet.Demo: http://jsfiddle.net/ThinkingStiff/LJrEW/
Script: