Target HTML Elements with Selectors Using jQuery 070

Tell us what’s happening:
The code I have written inside the script is not working…why??
Can anyone suggest me what should i correct here…

Your code so far

<script>
  $(document).ready(function() {
    $("button").addclass("animated bounce");

  });
</script>

<!-- 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">
      <h4>#left-well</h4>
      <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>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <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>
      </div>
    </div>
  </div>
</div>

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Linux; Android 7.1.1; Moto G (5S) Plus Build/NPSS26.116-26-4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36.

Link to the challenge:

Did you import Jquery in your code?

1 Like

I don’t know how to do that…

If you are on a code editor here you can found the solution: https://www.w3schools.com/jquery/jquery_get_started.asp

If you are working on codepen you have to add the same link of library in Settings > Javascript > Add External sources.

You have a typo above. JavaScript is case sensitive so addclass is not the same as addClass.

2 Likes

Yes you can check my code above i wrote addclass not addClass but my code is not working…

Thanks alot sir.it was just a simple mistake I was ignoring that.it was addClassnot addclass:pensive:now I can sleep peacefully :joy: