top of page

START CODING

Click Preview at the top-right to see how these examples work

Change text on button click

Change a text element’s content by clicking a button

Hello World

Use $w( ) to select an element using its ID

$w('#helloWorldText').

Hide and show elements, change button label

Toggle an
image's visibility

blogpost pictures of abstract art
blogpost pictures of abstract art

To help you access elements in code, make their IDs more descriptive in the Properties panel:

Collapse & expand elements, use dynamic selectors with variables

Create collapsible sections on a page

Beef & Mashed Potatoes

blogpost pictures of abstract art

Prime beef slices atop a bed of creamy mashed potatoes.

$24.00

Truffle Risotto

blogpost pictures of abstract art

Decadent Truffle Risotto: Rich, creamy, unforgettable.

$21.00

Duck Confit

blogpost pictures of abstract art

Succulent Duck Confit: Tender duck leg slow-cooked to perfection.

$19.00

The code editor also supports dark mode as shown in the code snippets above.

You will learn to:

  1. Change text on button click

  2. Hide and show elements

  3. Use dynamic selectors with variables

bottom of page