Skip to content

Srhbnnstr/jquery-dom-lab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  1. Get the value "Hello There".
  2. Change (or set) the value to "Hola".
  3. Add an h1 to the page that says "A Spanish Greeting".
  4. Add a second greeting ("Que tal?"), in a second column to the right of the first.
  5. 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!

About

A lab for practicing DOM manipulation with jQuery

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 66.7%
  • JavaScript 29.4%
  • CSS 3.9%