tags | languages |
---|---|
jquery, javascript |
javascript, html, css |
We are going to build a traffic light.
-
Fork this repository, clone that fork, and open up the directory in terminal.
-
In terminal type:
python -m SimpleHTTPServer 3000
. Go to the Preview at the top of Nitrous and click onPort 3000 (Default)
. Play around with the buttons and see what they do. -
Back in Nitrous open up the file
index.html
and read through the html template. -
Open up the file
script.js
file. Fill in code in each of the following sections:
- code for button 3 -- Turn the light Yellow
- code for button 4 -- Turn the light Green
- code for button 5 -- Say GO!
- code for button 6 -- Make Green Light Blink -- Extension!!
-
Save your changes to script.js. Go to terminal again and type:
python -m SimpleHTTPServer 3000
. Go to the Preview at the top of Nitrous and click onPort 3000
. Check that your changes work. -
When you're finished:
- Stage the changes you made:
git add .
- Commit those changes with a message:
git commit -m "all done"
- Push those changed up to your fork:
git push origin master
- Then open up a pull request on the original repository (that you cloned from).