I'm trying to use the jquery tooltip plugin to expand some image thumbnails, and show the full sized images when someone hovers over the thumbnails. However this is very jumpy, the tooltip jumps around 2-3 times before being fixed in one place even when the mouse stays static.
Why is that? Is there a way to fix it?
Html code:
<ul class="gallery" id="gallery">
<li>
<img src="<?=site_url('images/Balloon Fest..jpg');?>" class="galleryImg" />
</li>
</ul>
Javascript:
$(".galleryImg").tooltip({
delay: 0,
showURL: false,
bodyHandler: function() {
return $("<img/>").attr("src", this.src)
.attr('width', 300).attr('height', 300);
}
});
I've used that same jQuery plug-in, but it was given me some problems with large amount of elements on the same page. After testing some, I've opted for this one:
You can see a working demo here!
And the web page link Here!
EDITED
As requested on the comments, here you have a jQuery extension based on the above plugin:
JQUERY
USAGE
You can see this working Fiddle!
This Fiddle illustrates images from cross-domain, with relative path and from the
img
src
.Note that the relative path under Fiddle is buggy, sometimes you see it, other times you don't, but it works just fine!