the below mentioned code is working perfectly, that when clicking the thumbnail the larger image is opening in a blank window, but i have an html page fprod.html with a .
<div id="mainimg></div>
I want the image to be open there. Now, how to target the div in that html page?
$(function () {
$(document).on('click', 'div.prodcls img', function (e) {
e.preventDefault();
window.open($(this).attr('src').replace('images/zara/thumbnails/1.png', 'images/zara/big.png'), '');
});
});
You could open the fprod.html in a new window instead of the image. The URL to the image could be provided as a parameter and you could have a javascript in fprod.html put the image in the you wanted.
The script in fprod.html could look something like: