I want to prevent accidental activation of tooltips on hover using .delay and .queue.
This works, except that I do not know how to stop the execution of the queue at the mouse output (leave the area)
$('.has_tooltip').hover( function(){ $(this).toggleClass('highlight').delay(400).queue(function(next){ $(this).children('.tooltip').show(); next(); }); }, function(){ $(this).toggleClass('highlight').children('.tooltip').fadeOut(200) } );
source share