Making an interactive website


#1

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

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

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

if(prevSlide.length == 0) {
prevSlide = $('.slide').last();
}

prevSlide.fadeOut(duration).removeClass('active-slide');
currentSlide.fadeIn(duration).addClass('active-slide');

}
yet it refuses to pass through,,why


#2

Hi Emmanuel,

You've forgotten the closing parenthesis ()) for $('.arrow-prev').click(...); on the last line. You also need to close main with a closing curly brace (}), then call it on $(document).ready(); at the very end.

If you're still having trouble, please post:

  • A link to the exercise you're on
  • Your entire code
  • The error message you're getting

Thanks! :slightly_smiling: