Skip to content

Instantly share code, notes, and snippets.

@amessinger
Last active December 15, 2015 12:49
Show Gist options
  • Save amessinger/5263237 to your computer and use it in GitHub Desktop.
Save amessinger/5263237 to your computer and use it in GitHub Desktop.
Override jquery ajax if IE
$(function() {
if ('XDomainRequest' in window && window.XDomainRequest !== null) {
jQuery.ajaxSettings.xhr = function() {
try { return new XDomainRequest(); }
catch(e) { }
};
jQuery.support.cors = true;
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment