Completed the course, just have a question


#1



How does the browser know to only show the div with the class of "active-slide" when the page is first loaded? I can't seem to find the piece of code which actually separates it from the other div's.

I tried doing this on my own, but can't seem to figure it out without explicitly giving the class names of the other div's the hide method at the start of the main function, and then showing/hiding the classes when a specific button is clicked, like below:


var main = function() {
  $('.secPar').hide();
  $('.thirdPar').hide();
  
  $('.firstIt').click(function() {
    $('.thirdPar').hide();
    $('.firstPar').show();
    $('.secPar').hide();
    })


#2

@alexmiller0918
Read this
++ jquery length explained AND DOM pictures of flipboard
https://www.codecademy.com/forum_questions/5615308ab62548021c0000e4


#3

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