tags:

views:

390

answers:

1

I have written a jQuery script to glow and then fade out similar to the glow and fade here on stack overflow. The only issue I have is when i call the removeAttribute('filter') to fix the cleartype font for IE, it errors out in Firefox, thus stopping other scripts from working.

When I comment out the line, everything works except in IE the cleartype is ugly. Here is my method...

function flash(selector) {
  $(selector)
    .css('opacity', 0)
    .animate({ backgroundColor: 'khaki', opacity: 1.0 }, 800)
    .animate({ backgroundColor: '#ffffff' }, 350, function() {
      this.style.removeAttribute('filter');
    });
}

Any thoughts, ideas and such and such?

Thanks!

+2  A: 

Hmmm... does jQuery's removeAttr fail as well?

...
.animate({ backgroundColor: '#ffffff' }, 350, function() {
  $(this).removeAttr('filter');      
};
orip
Excellent, I didnt even think of that. Thanks a lot! Seems to be working!
gmcalab