Monday, April 19, 2010

jquery plugin: image magnifier

I've just released my first fully-fledged and useful jquery plugin:

     http://dcook.org/software/jquery/magnifier/

It allows you to magnify an image and examine just one part of it.
Handles on the edge of the "magnifying glass" allow resizing it, which alters the degree of magnification.
The plugin is fully documented, with numerous usage examples.
It runs on all major browsers and operating systems.
Naturally it is open source (MIT).

1 comment:

Unknown said...

A new version (0.2) is now up, after a soul-destroying debug session to work around various IE6/7/8 and safari problems.

Version 0.1 went wrong when IE6/7 were in strict mode: adding an extra "position:relative" fixed this.

IE6/7/8 were all affected by the arbitrary place I created a div (even though it is then immediately moved).

Safari (and chrome) return the wrong result from JQuery's outerWidth(true) function; I've changed the true to a false, which seems just as good in my case.

I also extracted a bonus utility extension: dcookorg_absPosition() for positioning a div relative to another.