It is a good idea. Not so much for "sniffing" out each and every browser, but for having one version for all non IE browsers and several jQ versions for several IE versions ;o)
The “ultimate solution" would be this: <![if !IE]> <!-- Not Internet Explorer --> <script src="jquery.2.core.js" ></script> <![endif]> <!--[if gte IE 8]> <!-- A recent version of Internet Explorer. --> <script src="jquery.2.ie8_or_better.js" ></script> <![endif]--> <!--[if lt IE 8]> <!-- Internet Explorer before IE8 --> <script src="jquery.2.ie_before_8.js" ></script> <![endif]--> <!--[if lt IE 7]> <!-- Internet Explorer before IE7 --> <script src="jquery.2.ie_before_7.js" ></script> <![endif]--> Where IE specific version will contain only overwrites of *only* certain “stuff” just if necessary . Not full versions of Jquery for each IE. Clear ? Not full jQ, just code required for IE version. Example: // jquery.2.core.js xhr: function() { return new XMLHttpRequest(); } // jquery.2 ie versions xhr: function() { return new ActiveXObject("Microsoft.XMLHTTP"); } the second overwrites the first , if IE is the host... Also. IE or not-IE "selection" can be dobe in one file with JScript conditional compilation feature ajaxSettings = { xhr: function() { return new XMLHttpRequest(); } //@cc_on , xhr: function() { return new ActiveXObject ("Microsoft.XMLHTTP"); } } alert(ajaxSettings.xhr) /* in IE shows : function() { return new ActiveXObject("Microsoft.XMLHTTP"); } in FF, Chrome, etc. shows: function() { return new new XMLHttpRequest(); } */ But the ultimate is the, above mentioned, conditional loading of js files ... And the last but not the least, is that this will make jquery.2.js totaly free of IE "goodies" and thus practically the fastest jQ. --DBJ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---