PDA

View Full Version : Image Magnify v1.1 close button



eclipsetalk
06-28-2011, 01:39 AM
1) Script Title: :: jQuery Image Magnify v1.1

2) Script URL (on DD): http://dynamicdrive.com/dynamicindex4/imagemagnify.htm

3) Describe problem:
I'm looking to add a close button to the pop up magnify as opposed to close it while one clicks on the image magnified itself.
I've seen post http://www.dynamicdrive.com/forums/showthread.php?t=56261 but the close image doesn't close the magnify.
Any help would be great. Thanks in advance.

jscheuer1
06-28-2011, 03:23 AM
Use this updated version:

3957

Configuration for the button is at the beginning:


/* jQuery Image Magnify script v1.1
* This notice must stay intact for usage
* Author: Dynamic Drive at http://www.dynamicdrive.com/
* Visit http://www.dynamicdrive.com/ for full source code

* Nov 16th, 09 (v1.1): Adds ability to dynamically apply/reapply magnify effect to an image, plus magnify to a specific width in pixels.
* Feb 8th, 11 (v1.11): Fixed bug that caused script to not work in newever versions of jQuery (ie: v1.4.4)
* June 27th, 11 : unofficial update for optional close button (http://www.dynamicdrive.com/forums/showthread.php?p=255483#post255483)
*/

jQuery.noConflict()

jQuery.imageMagnify={
dsettings: {
magnifyby: 3, //default increase factor of enlarged image
duration: 500, //default duration of animation, in millisec
imgopacity: 0.2 //opacify of original image when enlarged image overlays it
},
cursorcss: 'url(magnify.cur), -moz-zoom-in', //Value for CSS's 'cursor' attribute, added to original image
closebutton: 'zoomout.gif', // Image for close button, set to false (unquoted) for no close button
closebuttonprops: {right: 30, bottom: 30, title: 'Close'}, // offset from right of larger image, offset from bottom of larger image, button title
zIndexcounter: 100,

refreshoffsets:function($window, $target, warpshell){
var $offsets=$tar . . .