Friday, March 2, 2018

Sunny Day

After much trial and error, I have a universal version of Sunny day.
The little car is on JavaScript but the sun is on CSS.





                                       *    *     *


                                      *     *     *
Starting an onclick function with onclick equal to null stops from
starting over every time the user might click. It's once and for all!!


                                     
                                       *     *     *

Little car now turns around. Comes down to adding an EventListener...





                                           *     *     *

The this keyword allows me to run more than one command.






This code goes back to the initial set-up:

No comments: