User Agent strings don't target anything.
But if you can determine the salient differences between these strings and others as well as between each other, you can load different stylesheets based upon them.
Without testing I imagine this should work:
Code:
;(function(){
var ua = navigator.userAgent, osv, style5 = 'ioss5.css', style4 = 'ioss4.css';
if(/ipad/i.test(ua)){
osv = /cpu os (\d+)/i.exec(ua);
if(osv && osv[1] == 5)){
document.write('<link rel="stylesheet" href="' + style5 + '" type="text/css">');
} else if (osv && osv[1] == 4){
document.write('<link rel="stylesheet" href="' + style4 + '" type="text/css">');
}
}
})();
Configure the style5 and style4 variables to the stylesheets of your choosing.
Bookmarks