I have found inserting issue in Chrome and IE in FF working well
I have next code that change classes name
jQuery(document).on("mouseout", ".buttonStyleOver", { className: "buttonStyle" }, ChangeClass);
jQuery(document).on("mouseover", ".buttonStyle", { className: "buttonStyleOver" }, ChangeClass);
function ChangeClass(e) {
var el = e.srcElement || e.target;
jQuery(el).attr("class", e.data.className);
}
and I have next HTML part (please don’t critic it I know this is bad style)
<button id="RunItButton" class="buttonStyle" type="button" style="vertical-align:middle;padding-right:5px;height:25px"><div class="cmRunIt">Run It</div></button>
in IE and Chrome event also change class=”cmRunIt” to buttonStyleOver how to fix it ?
thanks.
To make you understand your problem, add a console.log :
You will see that some times
elis not your button but the div ! Why do you use e.srcElement ?Try with :
And marius is right, unless you need live events, you should use hover.