I am aware that they may be the same questions out there answered, i just can't seem to formulate my problem without showing my code:
I wish to have a DIV show on mouseover, however when i loose focus on the div the code naturally thinks i want it hidden again.. which i do but NOT when i change focus to the newly shown DIV. Any suggestions?
$('.eventinfo2').mouseover(function(){
$(this).parent().siblings('.snippetinfo').show();
})
$('.eventinfo2').mouseout(function(){
$(this).parent().siblings('.snippetinfo').hide();
});
the HTML:
<div class="container">
<div class="eventinfo2">
...
</div>
<div class="snippetinfo" style="display:none;">
...
</div>
Any help appreciated. I'm assuming i either need to set a variable and a conditional ?
First of all, you can use
mouseenterandmouseleaveYou can easily target the group by wrapping them in a
divSecondly, in your code, eventinfo2 and snippetinfo are siblings. If necessary target
siblings()notparent().sliblings()because the latter will refer to elements that are withing the same container as 'container'Here you go EXAMPLE