Skip to content

Instantly share code, notes, and snippets.

@skoskie
Last active January 12, 2019 19:44
Show Gist options
  • Save skoskie/3013038 to your computer and use it in GitHub Desktop.
Save skoskie/3013038 to your computer and use it in GitHub Desktop.
The unofficial new way to call jQuery 2.0. #jquery #cdn
<!-- https://twitter.com/paul_irish/status/218395508018921472 -->
<!--[if lte IE 8]>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript">
window.jQuery || document.write('<script src="js/libs/jquery-1.9.0.min.js"><\/script>')
</script>
// call old jQuery plugin 1
// call old jQuery plugin 2
<![endif]-->
<!--[if (gt IE 8)|!(IE)]>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script type="text/javascript">
window.jQuery || document.write('<script src="js/libs/jquery-2.0.0.min.js"><\/script>')
</script>
// call new jQuery plugin 1
// call new jQuery plugin 2
<![endif]-->
@paulirish
Copy link

Yeah I was talking to dmethvin and cowboy about the same thing last night.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment