Week 07
Multiple JS, DOM, Events and Callback Function
Week6 #7
1. Multiple JS files
You can keep your file in a separate js file.
2. DOM element and Callback Function
Document Object Model (DOM)
P5.dom library
Example
Example
Example
Callback function
Callback function is simple that
The function createButton is attached to the variable button.
And when the button is pressed, I want changeColor function os called.
Callback is simply one function is called and the other function is continuously called.
Example
Assignment
Have multiple .js file (at least 2)
Have DOM element (it can be anything, button, slider, check, wordform, etc)
Last updated