Need to delay loading of the *content* of a tooltip
I'm using jQuery UI tooltips on a long list of image links to show a preview of the image in a tooltip.
I'm delaying the tooltip by a second so that you won't get dozens of tooltips when you happen to move the mouse over the links:
$(document).tooltip({ 'items': 'a.preview', 'show': { delay: 1000 },
'content': function() {
return '<img class="frame" src="' + this.href + '">';
} });
This works fine, except that it does immediately load the images as soon as the mouse hovers over a link, which results in dozens of images loaded but not shown, when you move the mouse around.
Is there any way to tell jQuery UI not to generate the tooltip until after the delay?
Or alternatively, does anyone have a workaround for this issue? I tried to hack something in the open event, but that is immediately called as well.
Thanks,
– Michael