Skip to content

Instantly share code, notes, and snippets.

@mathiasbynens
Created April 8, 2010 11:53
Show Gist options
  • Save mathiasbynens/360010 to your computer and use it in GitHub Desktop.
Save mathiasbynens/360010 to your computer and use it in GitHub Desktop.
jQuery Crash plugin — updated to work with IE6, IE7 and IE8
/*!
* jQuery Crash for IE6, IE7 and IE8
* @description This is an expansion of the jQuery Crash plugin for IE6 by Chad Smith.
* @author Mathias Bynens <http://mathiasbynens.be/>
* Use $.crashIE6(); and/or $.crashIE7(); and/or $.crashIE8();
*/
;
$.crashIE6 = function(x) {
if ($.browser.msie && $.browser.version < 7) {
for (x in document.open);
}
};
$.crashIE7 = function() {
if ($.browser.msie && $.browser.version < 8) {
(function() {
function arguments() { }
}());
}
};
$.crashIE8 = function() {
if ($.browser.msie && $.browser.version < 9) {
(function() {
function arguments() { }
}());
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment