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'); }); 

demo: http://jsfiddle.net/qy7ba/


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -