jQuery Selector Challenge - solutions
To get started, clone this repo.
Open index.html
. In your Chrome Javascript Console, use jquery to select the element containing the words "Hello There" with as many different selectors as you can think of:
<!DOCTYPE html>
<body>
<div class="container">
<div class="row">
<div class="col-sm-6">
<div id="greeting">Hello There</div>
</div>
</div>
</div>
</body>
Also in your Chrome Javascript Console, try the following challenges:
- Get the value "Hello There".
- Change (or set) the value to "Hola".
- Add an h1 to the page that says "A Spanish Greeting".
- Add a second greeting ("Que tal?"), in a second column to the right of the first.
- Add the class "blue" to both greetings.
For each problem above, copy your solution into /scripts/app.js
on the correct line.
When you open index.html
in your browser, your solutions should all run!