slideToggle HELP!


#1


https://www.codecademy.com/courses/learn-javascript/lessons/javascript-dom/exercises/slide-toggle


Error Message: Did you attach slideToggle to next, and make it last 400 milliseconds?


function main () {
$('.skillset').hide();
  $('.skillset').fadeIn(1000);
  $('.projects').hide();
  $('.projects-button').on('click', function() {
    // $(this).next().toggle();
    $('.projects').next().slideToggle(400);
    $(this).toggleClass('active');
    $(this).text('Projects Viewed');
  });
}
$(document).ready(main);


#2

You want to apply it to this, not .projects.


#3

Thanks! Now I have beaten the whole course.


#4

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