Stuck at 15/16 exercise


#1

Whenever i click on the ‘view project’ button why the projects of all the three sections starts to toggle and slide?

<Below this line, add a link to the EXACT exercise that you are stuck at.>

Here is the code.

```

function main() {
$(’.skillset’).hide();
$(’.skillset’).fadeIn(5000);
$(’.projects’).hide();
$(’.projects-button’).on(‘click’, function(){

$(’.projects’).slideToggle(400);
$(this).toggleClass(‘active’);
$(’.projects-button’).text(‘Projects Viewed’)

});
}

$(document).ready(main);

<do not remove the three backticks above>

#2

If you’re referencing .projects (which I assume is the class of all 3 sections?) then this function will cause them all to toggle and slide.


#3

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