Click–Exercise 8

I am stuck on learn javascript lesson 8. Could someone point to me what went wrong?

var skillset= document.getElementsByClassName('skillset');
alert(skillset);
var main = function() {
var $skillset = $('.skillset');
  alert($skillset);
  $('.skillset').hide();
  $('.skillset').fadeIn(1000);
};
$('.projects').hide(skillset);
$(document).ready(main);

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-javascript/lessons/javascript-dom/exercises/click

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

Did you write a selector for the elements with a class of projects?
Did you hide the elements with a class of projects?

Ths code worked for me

function main() {
('.skillset').hide(); (’.skillset’).fadeIn(1000);

$(’.projects’).hide();

$(’.projects-button’).on(‘click’, function() {

});

}

$(document).ready(main);

This code is what they want:

function main() {
('.skillset').hide(); (’.skillset’).fadeIn(1000);

$(’.projects’).hide();

('.projects-button').on('click', function() { (’.projects’).toggle();
$(’.projects-button’).toggleClass(‘active’);
});
}

$(document).ready(main);

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