I'm using font face fix for IE, it using filter but every time I use jquery, jquery will replace the filter and font face fix will not working anymore. How do I call back the font face fix function every time any event or animation has been completed?
Font Face Fix URL : http://allcreatives.net/2009/12/05/jquery-plugin-ie-font-face-cleartype-fix/
Font Face Function :
(function(jQuery) {
jQuery.fn.ieffembedfix = function() {
// CONFIGURE THE PATH TO YOUR 1BY1 PNG HERE, RELATIVE TO THE LOCATION OF THIS JS FILE.
var pngimgurl = "/images/hIEfix.png";
return this.each(function() {
if (jQuery.support.objectAll == false) {
jQuery(this).css({
filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src='开发者_运维知识库 + pngimgurl + ',sizingMethod=crop)',
zoom: '1'
});
}
});
}
})(jQuery);
I think it is ridiculous to add it 1 by 1, I use a lot of jquery event.
Can you post your code? If you;re using a function that removes the filter then simply call the ieFFEmbedFix function below again at the end of whatever function that currently breaks it. The code I use is slightly modified from the original. For me on IE8 the following bit of code was never returning false:
if (jQuery.support.objectAll == false) {
// Not being hit
}
So this is what I use:
(function($) {
$.fn.ieFFEmbedFix = function(pathToPngImgUrl) {
return this.each(function() {
//Check for IE7/8
if ($.browser.msie && $.browser.version < 9 && $.browser.version > 6) {
$(this).css({
filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + pathToPngImgUrl+ ",sizingMethod=crop',
zoom: '1'
})
}
});
}
})(jQuery);
and then to call:
$('h1, h2, h3').ieFFEmbedFix('../images/hIEfix.png');
精彩评论