Target HTML Elements with Selectors Using jQuery 070

Target HTML Elements with Selectors Using jQuery 070
0

#1

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:


#2

Did you import Jquery in your code?


#3

I don’t know how to do that…


#4

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.


#5

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


#6

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


#7

Review the challenge again. Make sure what the correct spelling should be.


#8

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