Skip to content

Instantly share code, notes, and snippets.

@brunoais
Created February 20, 2012 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save brunoais/1871142 to your computer and use it in GitHub Desktop.
Save brunoais/1871142 to your computer and use it in GitHub Desktop.
my solution to deal with IE
<!--[if !IE]--><script defer type="text/javascript" src="{T_JQUERY_LINK}" onerror="location.href = (location.href.indexOf('?') !== -1) ? location.href.replace(/\?/, '?altjQuery&') : (location.href.indexOf('#') === -1 ? location.href + '?altjQuery': location.href.replace(/#/, '?altjQuery#'));" ></script><!--[endif]-->
<!--[if IE]><script type="text/javascript" src="{T_JQUERY_LINK}" onerror="location.href = (location.href.indexOf('?') !== -1) ? location.href.replace(/\?/, '?altjQuery&') : (location.href.indexOf('#') === -1 ? location.href + '?altjQuery': location.href.replace(/#/, '?altjQuery#'));" ></script>
<!--[if lt IE 9]><script defer type="text/javascript" src="{T_TEMPLATE_PATH}/isjQueryHere.js"></script><![endif]--><![endif]-->
<script defer type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js"></script>
<script defer type="text/javascript" src="{T_TEMPLATE_PATH}/ajax.js"></script>
<!-- the rest of javascript files with the defer. As long as it is same origin all is ok -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment