$('.whatever').hide() appears before hiding?


#1


JavaScript and the DOM lesson 7 or 8
https://www.codecademy.com/courses/learn-javascript/lessons/javascript-dom/exercises/click?action=lesson_resume&link_content_target=interstitial_lesson


This is not an error, I'm just trying to understand how it works.

The idea of the code is to hide these elements (and then fadeIn some).

The thing is: the page first loads and shows the elements and then hides them. This would look bad in a real website.Should I then put the JavaScript and JQuery links in the begining of the html document?


function main() {
  $('.skillset').hide();
  $('.skillset').fadeIn(1000);
  $('.projects').hide();
}

$(document).ready(main);


#2

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