I seem to have a problem with some jQuery, and I can't figure out where I am going wrong so I just want to take ie7 out of the equation by excluding it, can this be done with jQuery?
+1
A:
I don't know about jQuery, but you could prevent the code from running using Conditional Comments
Peter LaComb Jr.
2010-10-10 19:07:48
A:
if you need the detection inside a script(conditional comments are HTML-comments), you can detect it by checking some properties.
var ie7 = (document.all && !window.opera && window.XMLHttpRequest && typeof window.external.AddToFavoritesBar=='undefined') ? true : false;
var ie7mode = (document.all && !window.opera && window.XMLHttpRequest && !document.querySelectorAll) ? true : false;
inside a script you can use it like this:
if(!ie7mode)
{
//this will be ignored in IE7 or higher versions running in IE7-mode
}
if(!ie7)
{
//this will be ignored in IE7 only
}
Dr.Molle
2010-10-11 00:15:51