Still lost on Flipboard


#1

Remember to fade out the current slide and remove the 'active-slide' class

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

$('.arrow-next').click(function(){

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

if(prevSlide. length == 0) {
prevSlide = $('.slide').last()
}
currentSlide.fadeOut(duration).removeClass('active-slide');
prevSlide.fadeIn(duration).addClass('.active-slide');
});
currentDot.removeClass('active-dot');
nextDot.addClass('active-dot');

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


#2

Hi your code should have that structure

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

    $('.arrow-next').click(function(){
        ...
    });

    $('.arrow-prev').click(function() {
        ...
    });
};