I'm trying to change an elements class on mouse-over/out. The code below seems to fire repeatedly when the mouse moves over the target, even when the mouse is stationary, causing a slow (10/sec) flicker effect. What's causing the flicker? I was expecting the over/out functions to fire once on mouse over, and once on mouse out.
jQuery("[EMAIL PROTECTED]'xxx-']").hover( function(){ jQuery(this) .attr( 'class', this.className.replace(/xxx-(\w+)-off/gi, 'xxx-$1-on') ); }, function(){ jQuery(this) .attr( 'class', this.className.replace(/xxx-(\w+)-on/gi, 'xxx-$1-off') ); } ); ~ ~ David