Frank P Posted December 14, 2011 Share Posted December 14, 2011 Hi, I was not happy with the zoom scripts that I found on the net, so I wrote one myself, or one that simulates it. It has become an extremely simple one, and can be seen in action here (function toggleZoom). Click the images to zoom in and click to zoom out again. However, only the images with an initial width of >= 100 pixels will zoom out again. The ones width an initial width of < 100 (nrs. 4, 5 and 7) won't. Why is that, and how do I solve it? Quote Link to comment https://forums.phpfreaks.com/topic/253185-supersimple-zoom-script-but-only-big-images-will-zoom-out-again-why/ Share on other sites More sharing options...
Frank P Posted December 15, 2011 Author Share Posted December 15, 2011 Resolved. It appeared that my JS was comparing strings, not numbers. With the Number method things work well now. See the source code of the example for details. Quote Link to comment https://forums.phpfreaks.com/topic/253185-supersimple-zoom-script-but-only-big-images-will-zoom-out-again-why/#findComment-1298083 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.