JS and the DOM : on exercises my output buttons are actually not clickable


#1

Hi guys again, I’ve been working on JavaScript and the DOM: during my exercise apparently I was suppose to have as output clickable button of ‘’ Recent Project ‘’ when I finally confirmed my button are not clickable ? how come ? I reckon this is from the css style sheet ( which I didn’t modified ) part maybe, cause my java code seems good ? … I quickly check my css sheet and index > doesn’t look to me that those buttons are clickable.

The link
https://www.codecademy.com/courses/learn-javascript/lessons/javascript-dom/exercises/show?action=lesson_resume&link_content_target=interstitial_lesson

In case:

function main(){
  $('.skillset').hide();
  $('.skillset').fadeIn(1000);
  $('.projects').hide();
  $('.projects-button').on('click', function() {
    $('.projects').show();
  }
}
$(document).ready(main);


#2

You need to put more info in the on click function.

try adding:

$(this).next().slideToggle(400);
$(this).toggleClass('active');
$(this).text('Projects Viewed');
 });

#3

Thanks I will when I’ll understand your whole code : what I meant is that I am actually supposed to click on it on the exercises according to the following instructions to check it without needed to go further.

Click on the ‘Recent Projects’ buttons, and notice that the projects now show when clicked.

Notice that there are some problems though:

The projects don’t hide again when you click the button again.
When you click one button, all the projects show in each section.
It would also be nice if the button we clicked looked selected, or changed appearance when clicked.
We will solve these problems in the upcoming exercises.


#4

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