Hello
<div><img src="truc.png" /> Chouette</div>
I'd like to mouseoverize the div but not the img
$('div').mouseover(go_truc);
How can I do that ?
Hello
<div><img src="truc.png" /> Chouette</div>
I'd like to mouseoverize the div but not the img
$('div').mouseover(go_truc);
How can I do that ?
Handle the mouseenter
event, but do nothing if ($(e.target).is('img'))
.
Then, handle the <img>
element's mouseenter
event, and undo the effect.
With
function do_trucs() {
...
}
function do_machins() {
...
return (false);
}
$('div').mouseover(do_trucs);
$('div img').mouseover(do_machins);
It's working, but is it the simplest/best solution ?
(Anyway I need to handle the img.mouseover for other purpose)