WebFund 2013F: Tutorial 8
This tutorial is not yet finalized
To add a quit button:
- Add the button to the page in index.html (make it the letter Q) similar to the information and sound buttons.
- Style the button in a fashion similar to the info button in letterscript.css (look for the #infos attributes). Note you will have to change the offset; otherwise the button will overlap with the sound button.
- In letterpaint.js:
- Add a quitbutton variable similar to the one for sound or info.
- Add an event listener for the quit button, referring to a quit() callback function.
- Define quit(), having it set the value of window.location to be the URL you wish to visit when you quit ("/").