I have no idea on how to fix seemingly a simple problem. If you hover over the album covers there fadesIn an ( i ) icon if you hover over the ( i ) icon there comes up an Tooltip but it doesn't stay up it fadesOut after 1,2sec. How could i fix this that the tooltip stays up when you hover over the ( i ) icon and fadesOut when mouse leaves the icon.
Example here: http://www.midnightlisteners.com
my code:
// ( i ) Icon
$(".play, .more-info").mouseenter(function(){
clearTimeout($(this).data('timeoutIds'));
$(this).next(".more-info").fadeIn(600);
}).mouseleave(function(){
var someElement = $(this);
var timeoutIds = setTimeout(function(){
someElement.next(".more-info").fadeOut('150');
}, 1200); // giving a shorter time will reduce the fadeout effect
//set the timeoutId, allowing us to clear this trigger if the mouse comes back over
someElement.data('timeoutIds', timeoutIds);
});
// Tool-Tip
$(".more-info").mouseenter(function(){
clearTimeout($(this).data('timeoutId'));
$(this).find(".the-tooltip").fadeIn('150');
}).mouseleave(function(){
var someElement = $(this);
var timeoutId = setTimeout(function(){
someElement.find(".the-tooltip").fadeOut('150');
}, 1200);
//set the timeoutId, allowing us to clear this trigger if the mouse comes back over
someElement.data('timeoutId', timeoutId);
});