|
I am running this browser sniffing script in compatibility mode
thats why the $j instead of just $
// Is this a version of IE?
if($j.browser.msie){
$j('body').addClass('browserIE');
// Add the version number
$j('body').addClass('browserIE' + $j.browser.version.substring(0,1));
var usingBrowser = $j.browser.version.substring(0,1);
alert("IE "+usingBrowser);
}
It works fine and gives me the correct answer in IE6 and IE8 but
in IE7 the alert tells me "IE 6"
Whats up with that?
Thats problem number one.
Problem two is the while the alert message works fine, it
doesnt seem to want to add the new classes.
Last edited by TWD; 03-21-2010 at 07:58 AM..
|