Freecodecamp: Target the same element with multiple jQuery Selectors — Unable to Complete

Created on 28 Apr 2017  Â·  1Comment  Â·  Source: freeCodeCamp/freeCodeCamp

Target the same element with multiple jQuery Selectors

https://www.freecodecamp.com/challenges/target-the-same-element-with-multiple-jquery-selectors

Issue Description

The test case number 5 "Your #target1 element should have the classes animated‚ shake and btn-primary." is not able to be completed using Chrome 58.0.3029.81 (64-bit). I was able how however able to complete the test case using FireFox 53.0 (64-bit) using the exact same code.

Browser Information

  • Chrome 58.0.3029.81 (64-bit)
  • OS X 10.12.4 (16E195)
  • Desktop

Your Code

<script>
  $(document).ready(function() {
    $("button").addClass("animated");
    $(".btn").addClass("shake");
    $("#target1").addClass("btn-primary");
  });
</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="" id="target1">#target1</button>
        <button class="" id="target2">#target2</button>
        <button class="" id="target3">#target3</button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="" id="target4">#target4</button>
        <button class="" id="target5">#target5</button>
        <button class="" id="target6">#target6</button>
      </div>
    </div>
  </div>
</div>

Screenshot

screen shot 2017-04-28 at 10 32 13 am

>All comments

@MDR1
Thanks for reporting this. But your code is incorrect.
GitHub Issues are for reporting bugs on the website only.
Please use the HelpJavaScript chat room for getting challenge related help.

Happy Coding.

Was this page helpful?
0 / 5 - 0 ratings