I have the following code which toggles the visibility of a div when another div is moused over. It works fine, except if you mouse over and out repeatedly it queues all of the toggles:
$(document).ready(function() {
$('.trigger').mouseover(function(){
$('.info').toggle(400);
}).mouseout(function(){
$('.info').toggle(400);
});
});
I've tried this, but it doesn't seem to work (it creates problems with the visibility of the toggled div and ends up not showing it at all)
$(document).ready(function() {
$('.trigger').mouseover(function(){
$('.info').stop().toggle(400);
}).mouseout(function(){
$('.info').stop().toggle(400);
});
});
How do I get rid of the queue here?
.info
selector. – Duleba