Help with 8. Previous slide 1


Hi all,

im getting

Oops, try again. It looks like previous arrow isn't moving back to the previous slide. Look back at the instructions and check the $('.arrow-prev').click() event handler

When trying to use the hint text, which was the same as what i'd typed before using the hint code to the same results.

Its incredibly frustrating having a teacher that gets as stuck as the student... I was unable to find anything that worked on the forum either.

Any help greatly appreciated.

Here is the code.

var main = function() {
  $('.dropdown-toggle').click(function() {
  $('.arrow-next').click(function() {
  var currentSlide = $('.active-slide');
  var nextSlide =;
  var currentDot = $('.active-dot');
  var nextDot =;
  if (nextDot.length === 0) {
      nextSlide = $('.slide').first();
      nextDot = $('.dot').first();
  currentSlide.fadeOut (600).removeClass('.active-slide');

    var currentSlide = $('.active-slide');
    var prevSlide = currentSlide.prev();



Hi Fatlarry,

On lines 22 and 23, you need to remove the dot (.) inside the parenthesis (()) for addClass() and removeClass().

The reason for this is that the dot is used to identify the selector as being a class selector - you can also have id (#id) selectors, or tag name (tag) selectors, as the most basic ones.
But with addClass(), removeClass(), or toggleClass(), the computer knows it's dealing with a class, so that distinction isn't necessary :slightly_smiling:


Thank you. I wish the application could tell us these issues.


A post was split to a new topic: Need help on "Previous Slide 1" (ex. 8)