Hey guys,
I have some issues with the jQuery Plugin Cycle.
This is my slider Design:
The code:
- $(function() {
- $('#testimonial-features').cycle({
- timeout: 0,
- fx: 'scrollHorz',
- pager: '#testimonial-switcher',
- pagerAnchorBuilder: function(idx, slide) {
- return '#testimonial-switcher li:eq(' + idx + ') a';
- }
- });
and HTML:
- <div id="testimonial-switcher">
- <ul>
- <li><a href="#"><img src="../Bilder/button_video.png" /></a></li>
- <li><a href="#"><img src="../Bilder/button_photo.png" /></a></li>
- </ul>
- </div>
Everything works fine but I need to define an activ and rollover button for each pager.
I tried this script:
- $.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) {
- $(pager).find('img').attr('src','../Bilder/button_video.png');
- $(pager).find('li').removeClass('activeLI')
- .filter('li:eq('+currSlideIndex+')').addClass('activeLI')
- .find('img').attr('src','../Bilder/button_video_linkover.png');
- };
and basically it works.
But I need to add a second button in this script. I called it: button_photo and button_photo_linkover.
Because at the moment this script works for both pager. That means there are 2 times "button_video and "button_video_linkover and that doesn't make scene for my layout.
Does anyone know how I can add a second active status in this script or maybe a complete different way to solve my problem?
The second step would be to add a script for a rollover effect. ...