Mike Alsup,

Thanks so much for pointing out the obvious; no really, I mean it sincerely. I so often overlook the obvious, to my cost. I didn't realize that I could simply pass a bare integer to the cycle call.

Admiration and gratitude for a wonderfully well thought out and effective tool!

Jon


This is what I'd do:

<ul id="clientList">
   <li><a href="#" data-slide="2">Foo text</a></li>
   <li><a href="#" data-slide="5">Bar text</a></li>
   <li><a href="#" data-slide="6">Baz text</a></li>
</ul>


$(function() {
   $('#cycleport').cycle({
       prev: '#prev',
       next: '#next',
       timeout: 0,
       before: swapText
   });

   $('#clientList li a').click(function() {
       var slide = $(this).attr('data-slide');
       slide = parseInt(slide);
       $('#cycleport').cycle(slide);
       return false;
   });
});

Reply via email to