Nextdot 1


#1

please am stuck in lesson six

var main = function() {
$('.dropdown-toggle').click(function() {
$('.dropdown-menu').toggle();
});

$('.arrow-next').click(function() {
var currentSlide =$('.active-slide');
var nextSlide = currentSlide.next();

$('.arrow-next').click(function) {
var currentSlide =$('.active-slide');
var nextSlide = currentSlide.next();

var currentDot = $('.active-dot');
var nextDot = currentDot.next();

if(nextSlide.length === 0) {
nextSlide = $('.slide').first();
}

currentSlide.fadeOut(600).removeClass('active-slide');
nextSlide.fadeIn(600).addClass('active-slide');

currentDot.removeClass('.active-dot');
nextDot.addClass('active-dot');
});
};

$(document).ready(main);


#2

You wrote the .arrow-next click function twice, as shown below.

Delete one of them and you should be fine. Hope that helps and let me know if it works!


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.