freeCodeCamp Challenge Guide: Learn how Script Tags and Document Ready Work

freeCodeCamp Challenge Guide: Learn how Script Tags and Document Ready Work
0

#1

For some reason FCC likes to introduce jQuery before JavaScript itself.

To add JS to your HTML, you need a script tag. Your browser will run any JavaScript inside a script element, including jQuery.

Inside your script element, add this code: $(document).ready(function() { to your script. Then close it on the following line (still inside your script element) with: });

<script> $(document).ready(function(){

});</script>

Can't pass this one(SOLVED)
#2

Thank you! Any clue why they do jQuery before JS?


#3

jQuery before JS makes some sense in allowing people to be productive faster as they learn.

That said, I think the curriculum redesign puts JS before jQuery.


#4

:grin: Thank you, I had the same problem with the scrip tag.


#5

Thank you. I also had to switch from Google Chrome to an ie browser for this code to work btw. When I ran it on Chrome, I got a message: Chrome detected unusual code on this page and blocked it to protect your personal information (for example, passwords, phone numbers, and credit cards).


#6

Thanks, i just think put any cript into { } :stuck_out_tongue:


#7

so it is better to learn jquery before js or does it not make a difference ?


#8

It help me