zoom on picture in javascript after JS execute pic change -


i have image , function zoom in on mouse over. works well.

i have second picture (a thumbnail). if click on thumbnail, have js function change first image, in case, zoom in mouse on doesn't work, shows me original zoom.

my html:

<img src="small_1.jpg" border="0" id="bigimg"  data-zoom-image="big_1.jpg"><br> <a href="javascript:void(0)" onclick="showlarge('image_2.jpg')"><img src="small_image_2.jpg"></a> 

here js:

function showlarge(path) {   var full_path = path;   var full_path_large = 'large/'+path;   document.getelementbyid("bigimg").src = full_path;   document.getelementbyid("bigimg").setattribute("data-zoom-image",full_path_large); }  $('#bigimg').elevatezoom({ zoomtype: "inner", cursor: "crosshair", zoomwindowfadein: 500, zoomwindowfadeout: 750   });  

both functions work individually, zoom doesn't work after showlarge(path) executed.

any thoughts... thanks


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -