jquery - How to dynamically change cloud-zoom Zoom Image 1.0.2 using javascript -


i have found ways of changing zoom image using links rel="smallimage:image1.jpg" etc, creating image @ runtime , adding page, link not there when page first loads (which seems needs be). when generate image @ runtime, add thumbnail page , link open thumbnail large image. want able hover on image cloud-zoom functionality, if use code mentioned above set image, still see original image zoom image.

i wondering if there way can use jquery change zoom image @ same time change source of image? hoping simple $("image1").cloudzoom.zoomimage = "image2.jpg" nothing seems work.

thanks guys

you can place thumbnail in div , give div onclick event.

 <div onclick="displaythumbnail(imagepath)"><img src="imagepath" /></div> 

call javascript function , add this:

$('#cloudzoom').attr("href", newimagepath); $('.cloud-zoom, .cloud-zoom-gallery').cloudzoom();

the cloudzoom uses anchor tag's href point image use, reason update href new image tag.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -