Sunday 15 August 2010

Use Jquery 2.2 for modern browsers and 1.9 for older browsers as a fallback possible? -


So recently, Junkies released version 2 that stopped supporting older browsers. With the construction of miniFide and custom, it has become much faster and smaller (40kb), opposing 96 KB version 1.9. The issue is that it does not support older browsers, so I have been forced to use conditional comments, which include only 1.8 for 1.8 and below. However, as I need jquery 2.2 for the modern browser on my page, how do I stop old versions to ignore it?

In advance thank you

You can find answers here on the jQuery website: / P>

Use conditional comments as:

  & lt ;! - [If Lieutenant IE 9] & gt; & Lt; Script src = "jquery-1.xjs" & gt; & Lt; / Script & gt; & Lt; [Endif] - & gt; & Lt ;! - [gt 9]> gt; & Lt ;! - & gt; & Lt; Script src = "jquery-2.x.js" & gt; & Lt; / Script & gt; & Lt; -! & Lt; [Endif] - & gt;    

No comments:

Post a Comment