ClioSport.net

Register a free account today to become a member!
Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • When you purchase through links on our site, we may earn an affiliate commission. Read more here.

Javascript Help



  2014 Focus Titanium
Hey guys,

Need some advice, I nicked some Javascript code for creating a fading slideshow on our website, but what I would like is for each image to have a seperate link anchor. I've been googling about and trying a couple of different things but I'm not too fluent in Java, only HTML and a bit of CSS. Here is the code from the <HEAD>

<script type="text/javascript">
//<![CDATA[


var mygallery=new fadeSlideShow({
wrapperid: "fadeshow2", //ID of blank DIV on page to house Slideshow
dimensions: [670, 201], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["http://u.jimdo.com/www62/o/sa7798a11604d751c/img/i640aaab2c24ebf13/1402482347/std/image.jpg"],


["http://u.jimdo.com/www62/o/sa7798a11604d751c/img/ia782b0b4590a7729/1403001116/std/image.jpg"] //<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:4000, cycles:0, wraparound:false},
persist: true, //remember last viewed slide and recall within same session?
fadeduration: 1000, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""
})
//]]>
</script>

I need the first image to link to http://www.burstwickcountrygolf.co.uk/visitors/the-bcg-green-card/ and the second one to link to http://www.burstwickcountrygolf.co.uk/weddings/

Can anyone shed some light on this please? Cheers!
 
  182/RS2/ Turbo/Mk1
you will have to edit the actual fadeSlideShow (or use a different one) so that you can pass in an image and a destination for it to link to.

All pretty simple stuff TBH but you havent included the code for the function so I cant help.
 
  182/RS2/ Turbo/Mk1
Just looked for the library online and found it does that anyway, lol.


http://www.dynamicdrive.com/forums/showthread.php?69160-FadeSlideShow-links-to-images



Just do this


<script type="text/javascript">
//<![CDATA[


var mygallery=new fadeSlideShow({
wrapperid: "fadeshow2", //ID of blank DIV on page to house Slideshow
dimensions: [670, 201], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["http://u.jimdo.com/www62/o/sa7798a11604d751c/img/i640aaab2c24ebf13/1402482347/std/image.jpg","http://www.burstwickcountrygolf.co.uk/visitors/the-bcg-green-card"],


["http://u.jimdo.com/www62/o/sa7798a11604d751c/img/ia782b0b4590a7729/1403001116/std/image.jpg","http://www.burstwickcountrygolf.co.uk/weddings/"] //<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:4000, cycles:0, wraparound:false},
persist: true, //remember last viewed slide and recall within same session?
fadeduration: 1000, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""
})
//]]>
</script>
 


Top