Reputation: 479
Hope one of you can help and really appreciate it!
I have found an image magnifier on Dynamic Drive, but it's not exactly what I want.. it's perfect except for one thing. I don't want the user to CLICK on the image to view it, I want them to just be able to hover over it and the image enlarges on the middle of their screen. I have tried a few others such as this one: http://www.dynamicdrive.com/style/csslibrary/item/css3_hover_image_gallery/
If anyone has a link to one that is like what I am looking for, or can get the imagemagnify one to work on hover that would be perfect!
Here is the link to the one I like: http://www.dynamicdrive.com/dynamicindex4/imagemagnify.htm
Thank you all for answers!
Upvotes: 0
Views: 511
Reputation: 14747
I don't know of any other plugins that do what you're requesting, but it looks like you may be able to just edit the source code they provide for your own purposes since it's not minified.
To change it so that it enlarges the image on hover instead of click, you can just change the appropriate parts that handle clicking to mouseenter
and mouseleave
.
For example, you can change the following line...
$target.bind('click.magnify', function(e){ //action when original image is clicked on
to this...
$target.bind('mouseenter.magnify', function(e){ //action when original image is hovered over
Note: You would probably want to give them credit for the original code if you do so.
Upvotes: 1