javascript - elevatezoom mouse position — the struggle is real -


i using elevatezoom project , need mouse position while picture zoomed in. tried lot of different ideas undefined or nan. can tell me why?

look @ example:

$('#zoompicture').elevatezoom({   scrollzoom : true,   zoomwindowfadein: 250,   zoomwindowfadeout: 500,   responsive: true,   easing: true,   easingduration: 50,   bordersize: 1,   zoomwindowwidth: 400,   zoomwindowheight: 400, });  $("#zoompicture").bind("click", function(e) {   console.log(e.pagex);   console.log(e.pagey); }); // -> undefined 

could please let me know if below code works you

$(document).bind("click", "#zoompicture", function(e) {   console.log(e.pagex);   console.log(e.pagey); }); 

does link question: understanding event delegation


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -