开发者

CSS Style Issue with Content Slider and Last Pic

I have implemented a Content Slider and made some style changes.

http://jsfiddle.net/NinjaSk8ter/5tXgQ/

I also added an additional Thumb Pi开发者_如何转开发c (the 7th on the Right) and Main Pic.

For some reason, the Slider skips this Thumb Pic- why is that?


Seems it's a problem with your counting. Try the following

// ... *snip*
    theInt = setInterval(function() {
        $crosslink.removeClass("active-thumb");
        $navthumb.eq(curclicked).parent().addClass("active-thumb");
        $(".stripNav ul li a").eq(curclicked).trigger('click');
        curclicked++;
        if( 7 == curclicked )
            curclicked = 0;

    }, 3000);
};
// *snip* ...

Notice I've changed the line if(6 == curclicked) that resets to zero if the number of clicked thumbs exceeds the quantity of thumbnails (i.e. look to see if it's 7 instead of 6) instead of just equalling them.


You have seven images, but tell it to jump to first image after the first six.

curclicked++;
    if( 6 == curclicked )
        curclicked = 0;

Change it to 7 instead of 6 and it will work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜