Dynamic-Carousel icon indicating copy to clipboard operation
Dynamic-Carousel copied to clipboard

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

Open martharotter opened this issue 13 years ago • 0 comments

I was hoping to be able to do something like:

  • navigate through all the slides
  • replace final next button link with an anchor tag so the user goes to a different section

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");
    }
}

martharotter avatar Oct 02 '12 13:10 martharotter