Example Description
In this example, we demonstrate how to get started writing code in Velo. Learn how to use the $w API to select elements, set element properties, call element functions, and add event handlers to elements.
How We Built It
Page Elements
On the HOME page we added a text element and a button. We changed their IDs to 'helloText' and 'clickMeButton' respectively.
Code
On the HOME page, we used code to change the text shown in the text element when the page loads. In the Editor the text element's text is "EDITOR TEXT". When someone visits the page, before it loads, the text changes to "HELLO WORLD !". We also added an event handler to the button on the page. When the button is clicked, the text element's text changes again, this time to "HELLO WIX !".
Related Examples
Did this help?
|
Thanks for your feedback!
Add to Cart Gallery
Let customers to add products to their cart
INTERMEDIATE
Hide and Show Elements
Hide and show elements in response to user interactions
BEGGINER
Hide and Show Elements
Hide and show elements in response to user interactions
BEGGINER