javascript - zoom an image on a coordinate using jquery on onclick -
i want zoom jpeg image predefined image coordinates using onclick
function. have set of coordinates (x1,y1) , (x2,y2) , want zoom on these coordinates onclick
button.
please give me solution using jquery or ajax.
you enlarge image keep container fixed size e.g:
$('button').on('click', function () { var coords = '100,100'.split(','); $('img').width('400px'); $('img').css('marginleft', '-' + coords[0] + 'px'); $('img').css('margintop', '-' + coords[1] + 'px'); });
Comments
Post a Comment