This warmup gives you some DOM elements. There are several buttons that should print out names when they are clicked.
Your mission, should you choose to accept it, is to write the jQuery selectors to make the buttons work.
- Go into
js/warmup.js
- Replace the underscores
___
with real jQuery selectors - Refresh the web page and click the buttons to see if it works!
The first one has been filled out for you.
- http://api.jquery.com/category/selectors/ definitive guide
- http://oscarotero.com/jquery/ (see the first column "selectors")
- https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started/Selectors
- http://codylindley.com/jqueryselectors/
- Fork
- Clone
- Turn on TravisCI for the fork by visiting https://travis-ci.org/profile/, clicking the "Sync now" button and scrolling down to find the repository to build.
- Create a new branch for your work using
git checkout -b v1
- Implement specs and code
- Push using
git push -u origin v1
This warmup can be completed multiple times to increase your comfort level with the material. To work on this from scratch, you can:
- Add an upstream remote that points to the original repo
git remote add upstream git@github.com:gSchool/THIS-REPO.git
- Fetch the latest from the upstream remote using
git fetch upstream
- Create a new branch from the master branch of the upstream remote
git checkout -b v2 upstream/master
- Implement specs and code
- Push using
git push -u origin v2
Each time you do the exercise, create a new branch. For example the 3rd time you do the exercise the branch name will be v3 instead of v2.