Wilto / Dynamic-Carousel

A carousel plugin built for responsive layouts. There are many like it, but this one is mine.
matmarquis.com/carousel/
472 stars 112 forks source link

Possible to get an external link working at the end of the slide show? #78

Open martharotter opened 11 years ago

martharotter commented 11 years ago

I was hoping to be able to do something like:

However after replacing the href attribute, the navigation never happens.

Wondering why something like the below wouldn't work?

    // Update state of next/prev navigation:
    if( ( !!opt.prevSlide || !!opt.nextSlide ) ) {
        var $target = $('[href*="#' + this.id + '"]');

    $target.removeClass( opt.namespace + '-disabled' );

    if( ind == 0 ) {
        $target.filter(opt.prevSlide).addClass( opt.namespace + '-disabled' );
    } else if( ind == $slides.length - 1 ) {
        // Here we are on the last index, so we want to set the navigation to the next section
        $target.filter(opt.nextSlide).addClass('scrollme');
        $target.filter(opt.nextSlide).attr("href", "#early-access");
        $target.filter(opt.nextSlide).attr("title", "Find out more");
    }
}