Remove Attributes onmouseover and onmouseout

Posted by Abs on Stack Overflow See other posts from Stack Overflow or by Abs
Published on 2010-05-22T13:48:58Z Indexed on 2010/05/22 13:50 UTC
Read the original article Hit count: 198

Filed under:
|

Hello all,

I am trying to make use of JQuery's remove attribute like this:

$('#rom-img_1').removeAttr('mouseover');
$('#rom-img_2').removeAttr('mouseout');

However, it does not remove the effects of the events as the events are still triggered on mouseover and on mouseout. I have tried adding "on" before the events names too but JQuery doesn't use it like that.

Why isn't this working and how can I remove those attributes.

This is a bit of the HTML:

<div onmouseout="$('#heart_401').css({'display':'none'});" onmouseover="$('#heart_401').css({'display':'block'});" id="row-img_11"></div>

Thanks all for any help

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery