jquery - Jssor image change linked to dropdown menu -
i'm using jssor slider display product images on 1 of sites. i'm using slider thumbnail navigation , products standard implementation works standard. however, there number of products various options chosen drop-down list (each of has it's own specific image). load thumbnails loop through database table , same populate drop-down list.
what selection of specific drop-down option trigger same action clicking on relevant thumbnail , load full size image.
before added jssor slider product page had used javascript selected index , change main image source way:
(that's current version - without jssor)
but i'm not experienced jquery (i'm working php) i'm @ loss how work in jssor functions.
i've tried looking @ code triggered on clicking on thumbnail , trying fire on changing select box didn't anywhere.
this new version i'm working on can't drop-down trigger image change:
could point me in right direction start?
thanks
adding shadowbox opening code changeimage
function should work:
function changeimage(x){ var s = x.options[x.selectedindex]; document.getelementbyid("mainproductpic").src = s.getattribute("data-value1"); document.getelementbyid('thumbimageone').href = s.getattribute("data-value1"); mynum = s.getattribute("data-value2"); shadowbox.open(document.getelementbyid('thumbimageone')); shadowbox.change(mynum); }
Comments
Post a Comment