Created
March 20, 2011 13:45
-
-
Save Takazudo/878330 to your computer and use it in GitHub Desktop.
lazy alpha png background wrapper for fucking ie6
This file contains 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
/* author:Takazudo */ | |
$.fn.alphaBg = function(options){ | |
return this.each(function(){ | |
var src = options.src; | |
var $el = $(this); | |
if(!$.browser.ie6){ | |
$el.css('background-image', 'url(' + src + ')'); | |
}else{ | |
$el.css('filter', "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='fixed', src='" + src + "')"); | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment