freeCodeCamp/guide/english/certifications/front-end-libraries/bootstrap/create-a-class-to-target-wi.../index.md

37 lines
1.1 KiB
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: Create a Class to Target with jQuery Selectors
---
## Create a Class to Target with jQuery Selectors
The last challenge had you adding some classes to your ```html <button></button> ``` elements to style them, this time you are required to add other classes to those buttons which would allow jQuery to target them.
### Hint
Edit the classes
### Solution
Since you have to add the ``` target ``` class, the following is the solution:
```html
<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 target"></button>
<button class="btn btn-default target"></button>
</div>
</div>
<div class="col-xs-6">
<div class="well">
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
</div>
</div>
</div>
</div>
```