Create a Class to Target with jQuery Selectors-Query

Create a Class to Target with jQuery Selectors-Query
0

#1

what “target” class will do here?

Your code so far

<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <div class="well">
        <button class="btn btn-default target"></button>
        <button class="btn btn-default"></button>
        <button class="btn btn-default"></button>
      </div>
    </div>
    <div class="col-xs-6">
      <div class="well">
        <button class="btn btn-default"></button>
        <button class="btn btn-default"></button>
        <button class="btn btn-default"></button>
      </div>
    </div>
  </div>
</div>

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36.

Link to the challenge:


#2

if you want to target class, you can use the jQuery selector by;

$(".className")


#3

One example of what “target” class is doing can be seen if you add some internal CSS to your HTML.

For example, add this at the top of your code:

.target {background-color: red;}

and you’ll see your button will turn red.