| I Quit Smoking JavaScript |
|
|
| Updates every second without reloading page.
Changed the calculations so 4 weeks does not equal 1 month. Added ability to change amount of life saved. (some say 5 minutes, some say 10, so now you decide) Reduced life saved display to weeks because of the problem of calculating 4 weeks equal to 1 month. I seem to have gotten the decimal place bug fixed so should only display up to two decimal places now. Fixed incorrect display of 0 minute and 0 second to read 0 minutes and 0 seconds. Fixed incorrect month calculation |
|
|
|
|
|
|
| Retrieve the basic script by visiting the I
Quit Smoking page and saving it.
|
| To enter your quit information, open the I Quit Smoking page in a text editor, then find the following text near the top of the document: |
| //********************** Begin Script ****************************
//**** Fill in the following values with your quit information **** //****************************************************************** You can change the text between the quotes to suit yourself. var quit_text = "I quit! I've now been smoke free for ";
Change the numeric values to match your quit information. var quit_year = 98;
|
| There are clearly marked areas in the page above and below the code
which creates the Quitting information where you may enter any other HTML
code to personalize your page.
|
| After entering your quit information, save the page, then open it in
your favorite browser to view the results.
|