> Portal Navigation:
>
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt
## Resource: Change the Text Label of a Button with Events
## Article: Change the Text Label of a Button with Events
## Article Link: https://dev.wix.com/docs/develop-websites/articles/code-tutorials/wix-editor-elements/change-the-text-label-of-a-button-with-events.md
## Article Content:
# Velo Tutorial: Change the Text Label of a Button with Events
An **Event** is something that happens to an element in your site. The **Events Handlers** section in the [Properties & Events panel](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/velo-workspace/properties-events-panel/about-the-properties-events-panel.md) lets your site respond to these events by adding **Event Handlers** to your elements. For example, let's say you have a site with a "Take the tour" button. You'd like the text on the button to change to "Let's Go!" when the user hovers over it. Here's what you would do:
1. Use the Add panel to add a button to your site.
2. Change its text to "Take the tour".

3. The Properties & Events panel shows you the default properties for the button you just added.
4. In the Properties Panel, click on the **ID** name to rename the element to **takeTourButton** and press **Enter**. This makes the element easier to identify. (This isn't required, but it is recommended.)
5. In the **Event Handlers** section click **onMouseIn,** click the **+** , and press **Enter**. The name of the onMouseIn event handler is displayed.
6. Code is automatically added to the code editor. This is what you'll see there:
```javascript
$w('#takeTourButton').onMouseIn((event) => {
// Add your code for this event here:
})
```
7. Let's add the code that changes the text on the button. Afterwards we'll go back and see how it worked. Under line 7 where it says: **//Add your code for this event here:** add a line and type **$**.
8. A popup window opens that contains a list of all the elements in your site surrounded by some code. Use the arrow keys to move down and select **$w("#takeTourButton")**.
9. Press **Enter** to add the code for the element you selected.
```javascript
$w('#takeTourButton').onMouseIn((event) => {
// Add your code for this event here:
$w('#takeTourButton');
})
```
10. Now enter a period at the end of the line and you'll see a popup window that contains a list of all the properties, methods, and events that you can use with your element. Use the arrow keys to scroll down and select the **label** property.
11. Press **Enter** to add the code you selected.
```javascript
$w('#takeTourButton').onMouseIn((event) => {
// Add your code for this event here:
$w('#takeTourButton');
})
```
12. To set the label to its new value add **\= "Let's Go!";** at the end of the line and save your work.
```javascript
$w('#takeTourButton').onMouseIn((event) => {
// Add your code for this event here:
$w('#takeTourButton').label = "Let's Go!";
})
```
And that's it! Click **Preview** and you can test that your code works. Hover over the "Take the tour" button and it will change to look like this: