In the last lesson, you learned how many different events you can listen for with Bricksforge. Once you’ve set up an event listener, you need to decide what happens when the event is fired. This is where actions come into play. Bricksforge offers a plethora of predefined actions you can choose from.
Understanding Actions
An event action is the reaction to a triggered event. For example, if you have an event listener that listens for a button click, the action could be to show or hide a specific element on the page. Or, if you have an event listener that listens for a specific scroll position, the action could be to change the background color of the page.
Bricksforge offers a variety of predefined actions that you can use to create the desired effect when an event is triggered. These actions are designed to make it easy for you to create interactive and dynamic web pages without having to write code.
Let’s use a simple analogy to make this concept clearer! Think of Event Actions Like a Light Switch.
Event (Trigger): Flipping the light switch.
Action (Response): The light turning on or off.
Just like flipping a switch triggers a specific response from the light, setting up an event listener in Bricksforge triggers a predefined action on your website.
In the next lesson, you’ll get a list of all the predefined actions that Bricksforge offers.