I hope you are doing well and staying at home.
So, after a short intro of this new series, let’s get started.
Chapter 0 – Introduction
- Access Content
- Modify Content
- Program Rules
- You can specify a set of steps for the browser to follow (like a recipe), which allows it to access or change the content of a page.
- React to Events
- You can specify that a script should run when a specific event has occurred.
Couple examples for each of them:
- Select the text inside all of the <h1> elements on a page.
- Select any elements that have a class attribute with a value of note
- Find out what was entered into a text input whose id attribute has value of email
- Add a paragraph of text after the first <hi> element
- Change the value of class attributes to trigger new CSS rules for those elements
- Change the size or position of an <img> element
- A gallery script could check which image a user clicked on and display a larger version of that image.
- A mortgage calculator could collect values from a form, perform a calculation, and display repayments.
- An animation could check the dimensions of the browser window and move an image to the bottom of the viewable area (also known as the viewport).
React to Events
- A button is pressed
- A link is clicked (or tapped) on
- A cursor hovers over an element
- Information is added to a form
- An interval of time has passed
- A web page has finished loading
Thank you for reading. Next post will be a short refreshing of HTML and CSS. Don’t forget to subscribe to my blog if you want to hear about it. See you in the next post.
Please stay safe and be yourself. 🙂