The truth is that all these solutions work, just not with the project, so I re-ask the question a little differently **
Essentially, I have an image that, when someone moves the mouse over it, displays a div (which contains the image - aka play button). When they move, the cursor is outside the image, the play button disappears.
It works, but if you move the curse on the play button, it looks like crazy, so I have to mix up my events somehow.
Thank you in advance for your help ...
HTML
<div id="cont">
<div id="art" style= "position: absolute; left: 20px; top: 40px;">
<a href="#"><img src="http://www.newmusicproducer.com/img/ic_play.png"></a>
</div>
<img src="https://i1.sndcdn.com/avatars-000008744854-5sr588-large.jpg?d408275" alt="smile" id="imgSmile"></img>
JQuery
$(document).ready(function() {
$('#art').hide();
$('#imgSmile').mouseenter(function() {
$('#art').show();
});
$('#imgSmile').mouseleave(function() {
$('#art').hide();
});
});
Here is the violin
Chris source
share