Bug in IE with jQuery highlight? Highlighting is sticking on some elements

551 views Asked by At

Is there anything wrong with this line?

$('#' + $(this).attr('id') + 'title').effect("highlight", {}, 5000).fadeIn(1000);

It's being applied to a set of divs in cycles - the first time it shows them, and then as it keeps going round it highlights them again (as they are already shown.)

Only, in IE7 and IE8 the highlight seems to stick on some elements randomly. Anyone know why this is?

1

There are 1 answers

0
Nick Craver On BEST ANSWER

If you have any invalid html, IE will tend to do this. Make sure your html is valid by inputting it here: http://validator.w3.org/ and seeing if there are any unclosed tags, improper tags, multiple IDs, etc.

I see this happen most often then a tag isn't closed/matched properly, or when the same ID is used multiple times in the page, fixing the tag or moving to classes for those multiple IDs usually resolves the issue.