Skip to content

Instantly share code, notes, and snippets.

@remy
Forked from cowboy/jquery.ba-ie6ize.js
Created November 13, 2009 23:44
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 remy/234270 to your computer and use it in GitHub Desktop.
Save remy/234270 to your computer and use it in GitHub Desktop.
/*!
* 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/
*/
(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.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