<http://jsfiddle.net/RBJ9R/1504/>
I would like the mouseleave trigger area to increase in size to include the image as well as the original mouseenter area (gray box). I would like the user to be able to still see the image if they mouse over into the image area.
thanks!
#slender-trigger {
background-color: #CCC;
height: 100px;
width: 120px;
margin-left: 0px;
margin-top: 50px;
position: absolute;
}
#slender {
font-family: 'Strait', sans-serif;
height: 400px;
width: 400px;
border: thin dotted #F00;
position: absolute;
margin-top: 50px;
margin-left: 120px;
display: none;
}
<div class="purchasing-tips">
<div id="slender-trigger">nnnn</div>
<div id="slender" style="background-image:url(http://lorempixel.com/120/100/people); height: 100px; width: 120px; border: 1px solid black;">sadfasdf</div>
</div>
$("#slender-trigger").on("mouseenter", function() {
$("#slender").show();
}).on("mouseleave", function() {
$("#slender").hide();
});
Simply write this way:
$("#slender-trigger, #slender").on("mouseenter", function() {
$("#slender").show();
}).on("mouseleave", function() {
$("#slender").hide();
});