View Full Version : jquery spyglass effect

09-06-2010, 09:45 AM
Hey guys. This has been bugging me forever and i cant seem to find a working way to do this. Does anyone happen to know how to make a spyglass like effect in jquery. What i mean by spy glass is that the background of a div would be black, and there would be another movable div within the black one. When you move it around it reveals whats under the black. What i am exactly looking for is done on jcrop. when you select the part that you want to crop, the box created shows the image, while there is still a semi transparent background around it. Hope i made some sense, any help is majorly appreciated!:thumbsup:

09-07-2010, 02:52 AM
Ok so this is my first attempt. http://www.slappyjaw.com/test.html. But the problem is is that it seems to lag kind of. Any ideas of how to fix that. What it does is it uses the left and top values of the selector box and then changes the background position of the selector box to those coordinates.