I want to unbind the mouseover event when the element is clicked.
HTML markup:
<div id="foto"></div>
<div id="flotante"></div>
<div id="flotante2"></div>
jQuery code:
$('#foto').on({
mouseover: function(){
$('#flotante').delay(2000).show('slow');
},
mouseleave: function(){
$('#flotante').hide('slow');
},
click: function(){
// I want the mouseover event to stop executing.
$('#flotante2').show();
}
});
You can see an example here: http://jsfiddle.net/K85DN/
Thanks a lot for your help
$('#foto').off('mouseover')inside the click callback ?