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

Learn How Script Tags and Document Ready Work


Solution 1 (Click to Show/Hide)
  $(document).ready(function() {
<!-- Only change code above this line. -->

<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <div class="well" id="left-well">
        <button class="btn btn-default target" id="target1">#target1</button>
        <button class="btn btn-default target" id="target2">#target2</button>
        <button class="btn btn-default target" id="target3">#target3</button>
    <div class="col-xs-6">
      <div class="well" id="right-well">
        <button class="btn btn-default target" id="target4">#target4</button>
        <button class="btn btn-default target" id="target5">#target5</button>
        <button class="btn btn-default target" id="target6">#target6</button>

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

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.

1 Like

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

1 Like

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).

1 Like

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

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

It help me

1 Like