3 ms·
What I want is a jQuery-like library that can dynamically load alternative versions based on the browser in use, so that modern browsers load something close to
by mistercow 15y ago
What I want is a jQuery-like library that can dynamically load alternative versions based on the browser in use, so that modern browsers load something close to zepto, while IE6 loads all the fixin's.
- huskyr 15y agoPut this in the end of your html file in a <script> tag (function() { var src = (document.querySelector) ? '//zeptojs.com/zepto.min.js' : '//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js'; document.write('<script src="' + src + '"><\/script>'); })(); This will load Zepto if the browser supports it, and jQuery otherwise.