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

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -