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
Post a Comment