Hello Multi-State Boxes

Switch between different states of a multi-state box.

Introduction Last updated: 03 Feb 2025

About


This example demonstrates how to use buttons to change a multi-state box's state.

Multi-state boxes contain multiple states, each with different content, and display only one state at a time. In this example, clicking a button updates the state of the multi-state box to display the corresponding image.

APIs


How we built it


We added the following to our site:

Page Elements

Home

Frontend Code

Home

The code in this file assigns an `onClick()` event handler to each button, which changes the state of the multi-state box to display the corresponding image when clicked.

Code Snippets


Home
Copy

Get Help


Join the community

Join the Wix Studio community on Discord, where experienced developers and fellow creators come together to share tips, troubleshoot issues, and collaborate.

Hire a developer

Building a coded solution on your own can be challenging. Let an experienced Wix developer build it for you, so you can keep working on your site or business. Visit the Wix Marketplace to find a trusted developer.

Did this help?