[jQuery] [NEW FUNCTION] fixClearType (with opacity in IE6/7 quirkmode)
Hi,
I had a problem with the feature Cleartype of Windows and Opacity
(effects like "fadeIn", widgets like "tabs", etc...). The problem
appears with IE6 and IE7 (quirksmode) browsers. You know it, the
cleartype effect dissapears in text.
I use jquery version 1.2.6 but it seems to me that, at the end of
using/animating opacity, it leaves css feature "filter" with a blank
string when it should be removed (when these effects end, you can see
this behavior using: alert(this.style.cssText): 'FILTER:;ZOOM:1').
So I use this function to fix it:
jQuery.fn.fixClearType = function(){
return this.each(function(){
if( !!(typeof this.style.filter && this.style.removeAttribute))
this.style.removeAttribute("filter");
})
}
examples of use:
FADEIN:
$("#mydiv").fadeIn(500,function(){$(this).fixClearType()});
TABS (2.7.3, not the ui-tabs):
$('#div2tab').tabs({onShow: function(tabclicked,
content2show){$(content2show).fixClearType()}})
--
Enrique Meléndez Estrada (2367)
Servicios Informáticos
Organización y Servicios Internos
Instituto Tecnológico de Aragón