-
-
Save ozeias/235943 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* jQuery ie6ize: Emulate IE-6 rendering - 11/13/2009 | |
* http://mankzblog.wordpress.com/2009/11/13/ie6-frame-to-battle-chrome-frame/ | |
* | |
* Created by Mats Bryntse | |
* | |
* Plugin-ified by "Cowboy" Ben Alman | |
* http://benalman.com/ | |
* | |
* Bookmarklet version: | |
* http://bit.ly/ie6ize | |
*/ | |
(function($){ | |
if ( $.browser.msie && $.browser.version == 6 ) { | |
// IE6 doesn't need any help. Well, it can use all the performance it can | |
// get, so let's help it out a little. | |
$.fn.ie6ize = function(){ return this; }; | |
return; | |
} | |
// Carefully selected IE6 features. | |
var props = [ | |
{ "float": "left" }, | |
{ "margin-left": "10px" }, | |
{ "width": "102%" }, | |
{ "height": "110%" }, | |
{ "position": "absolute" }, | |
{ "display": "inline" }, | |
{ "color": "#fff" } | |
]; | |
// The plugin itself. Usage: | |
// | |
// $("*").ie6ize(); | |
// | |
// Note: you must specify "*" to _properly_ emulate IE6. | |
$.fn.ie6ize = function(){ | |
return this.each(function(){ | |
$(this).css( props[ Math.random() * props.length << 0 ] ); | |
}); | |
}; | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment