Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery cycle: Goto Slide# using text link

Tags:

jquery

http://procollage.com/site10

Please see this page I've been working on ALL DAY to just make the text:
• Blended Collage #1
• Bordered Collage
• Blended Collage #2
• Magic Mosaic
• Blended Collage #3

I would simply like when each is click for the slideshow to show the corresponding slide. I thought it would be simple, but 6 hours later, i'm still struggling. If the slideshow could continue after it's clicked that would be great... if not, i can live. PLEASE HELP!

like image 943
dg. Avatar asked Jan 22 '10 02:01

dg.


2 Answers

To answer your questions, here is the full context:

<html>
<head>
<script type="text/javascript">
  $(document).ready(function() {
    $('.samples').cycle({
      fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
    });
  });

  function setSlide(index) {
    $('.samples').cycle(index);
  }
</script>
</head>
...
...
<a href="javascript:setSlide(0)">Blended Collage #1</a><br />
<a href="javascript:setSlide(1)">Bordered Collage</a>
...
...
like image 193
JAKEtheJAB Avatar answered Oct 31 '22 07:10

JAKEtheJAB


Well since you're using the jQuery cycle plugin, you can use those links as pagers per the Intermediate demo here.

Something like this using your menu:

$('.samples').cycle({ 
    pager:  '.menu_table' 
});

Made a slight edit in regards to the element reference on the cycle plugin (I had copied from the cycle plugin website but now it's specific to your cycle element which is called .samples)

like image 39
jay Avatar answered Oct 31 '22 06:10

jay