View Full Version : Slideshow Code Question (Easy)

06-18-2010, 02:32 AM
Hey guys, this should be a very easy fix for someone who knows Javascript (which I don't). The following code allows the class "ul.slideshow-nav li" to control the navigation of the slideshow, I want to adjust this script to allow "ul.slideshow-nav li" AND "ul.slideshow-nav2 li" to do this, possible?

$slideshow = {
context: false,
tabs: false,
timeout: 8000,
fx: 'scrollLeft',
slideSpeed: 900,
tabSpeed: 900,

init: function() {
this.context = $('#content-slideshow');
this.tabs = $('ul.slideshow-nav li', this.context);

startSlideshow: function() {
$('div.slideshow > ul', $slideshow.context).cycle({
fx: $slideshow.fx,
pager: $('ul.slideshow-nav', $slideshow.context),
pagerAnchorBuilder: $slideshow.startTabs,
before: $slideshow.Tabactive,
timeout: $slideshow.timeout,
speed: $slideshow.slideSpeed,
fastOnEvent: $slideshow.tabSpeed,
pauseOnPagerHover: true,
pause: true

startTabs: function(i, slide) {
return $slideshow.tabs.eq(i);

Tabactive: function(currentSlide, nextSlide) {
var activeTab = $('a[href="#' + nextSlide.id + '"]', $slideshow.context);
if(activeTab.length) {

$(function() {