Created
March 6, 2009 11:40
-
-
Save yoko/74871 to your computer and use it in GitHub Desktop.
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
$.fn.backgroundImage = function(src) { | |
var bg = $.browser.msie6 ? | |
{ filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+src+'")' } : | |
{ backgroundImage: 'url('+src+')' }; | |
return this.each(function() { | |
$(this).css(bg); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment