4 Comments

imgpreview-screen

There is a nice jQuery plugin called imgpreview.

It’s from James Padolsey. He made it back in 2009 and you can read more about it on this page:

http://james.padolsey.com/javascript/new-jquery-plugin-imgpreview/

This is the demo page: http://james.padolsey.com/demos/imgPreview/full/ 

It’s really easy to use. Your HTML should look like: 

<a href="http://www.google.com/intl/nl/images/logos/chrome_logo.gif">text</a>

 [more]

And the jQuery is:

$('a').imgPreview();

 

So when you hover the anchor (a) link text, it will popup the image referenced in the href. So far so good. But when you have dynamic pages and there might not be a selected element, you will receive an error. As noted by Françoise, it’s a (minor) bug.

So therefor I have made a minor adjustment and will share a small updated version of the plugin from James Padolsey which will fix the “a is undefined” error in imgpreview.

 

By the way, I have used http://jscompress.com/ to minify the source again.

Good luck!

Best regards,

JP

kick it on DotNetKicks.com Shout it

Pin on pinterest Plus on Googleplus Post on LinkedIn

Comments

Comment by DotNetShoutout

Small jQuery plugin update: imgpreview

Thank you for submitting this cool story - Trackback from DotNetShoutout

Comment by DotNetKicks.com

Small jQuery plugin update: imgpreview

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Comment by syngu.com

Pingback from syngu.com

Small jQuery plugin update: imgpreview | .NET and Ajax | Syngu

Comment by remo

Great job dude.. Thank you for posting, going to use your update on a project.

remo