Tuesday, June 2, 2009

Firefox and Mouseout Issue

Today I had an a very minor issue, but it was worth writing here. Firefox had this nasty delay of triggering from the mouseover even to mouseout event on my menu which had a javascript to be executed in order to change the text inside a span tag. Having done this tons of times before, I cannot recall this issue. However, this might be due to the fact that the anchor tag encompassing the span tag of the menu had a background image applied and this might be the cause of conflict or delay on the triggering of the mouseout event of the span tag. This issue was not displayed in IE, Opera or Safari, though.

I tried using innerHTML to change the text, but of no avail. After a couple of quick searches, I found out using the
obj.firstChild.data
element, where obj is your span tag. It worked perfect miraculously! This brings to the conclusion that the old school DOM model is still worthwhile!

No comments: