I am having javascript problem when I apply lens zoom like on this w3chool page: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_image_zoom But my case is a little different, I have to add a button to next image, by ajax to change the image's src, The problem is that when I change the image, the javascript code doesn't work anymore.
<div class="wapper_btn"> <div class="img_previous"> <div class="btn btn-primary">previous image << </div> </div> <div class="img_next"> <div class="btn btn-primary">next image << </div> </div> </div> <div class="inner-image img-zoom-container"> <img src="asset/img/img.jpg" alt="" class="img-vip img" id="myimage"> <!-- Image path will change ajax when click button (.btn) --> <div id="myresult" class="img-zoom-result" style=""></div> </div>
https://stackoverflow.com/questions/67394686/zoom-lens-image-if-image-chage-src-with-ajax May 05, 2021 at 11:07AM
没有评论:
发表评论