What's the easiest way to tell if the browser is an IE 6 version in JavaScript? We're using MooTools here and Browser.Engine.trident
will be true
if it's IE, but what about the version number?
Add a comment
|
2 Answers
if (Browser.Engine.trident4) alert('is IE6');
-
That is deprecated and doesn't exist in any version greater than the one you included a link to. Thanks anyway though. Feb 26, 2010 at 0:52
-
The Browser class is in their current docs though. Another quick Google and we have an answer.– OliFeb 26, 2010 at 0:59
-
1@JamesBrownIsDead:
Browser.Engine.<engineName><engineVersion>
isn't at ALL deprecated and is infact included in all Mootools versions starting 1.2. It is just generated dynamically instead of generated statically. But if you still believe it is deprecated, useBrowser.Engine.name
andBrowser.Engine.version
. +1 to Oli. Feb 26, 2010 at 1:25 -
quite, the
Browser
collection in mootools is entirely based upon feature detection and not only is it not being deprecated but it's being added to (things like css3 feature detect, base64 detect, etc) are all plugins you can extendBrowser
with. I think he meant that window.ie6 (from mootools 1.1.1) got deprecated though. Feb 26, 2010 at 2:42 -
His first comment was based on my original answer which did use the deprecated
window.ie6
attribute.– OliFeb 26, 2010 at 8:49
Just to keep this up to date. Most current version of Mootools you need:
if (Browser.ie6) alert('is IE6');