# Code to Change Slide on Page on Menu Item Click

**URL:** <https://forum.wixstudio.com/t/code-to-change-slide-on-page-on-menu-item-click/58743>\
**Category:** Ask the community\
**Tags:** technical-talk, question, code, wix\
**Created:** [May 2, 2024, 6:01pm UTC](https://forum.wixstudio.com/t/code-to-change-slide-on-page-on-menu-item-click/58743 "2024-05-02T18:01:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [May 2, 2024, 6:26pm UTC](https://forum.wixstudio.com/t/code-to-change-slide-on-page-on-menu-item-click/58743/2 "2024-05-02T18:26:20Z")

</div>

Why not mentioning the whole story?

> [@How can I read the value of a menu item within a sub menu and make an action as the item is clicked?](https://forum.wixstudio.com/t/how-can-i-read-the-value-of-a-menu-item-within-a-sub-menu-and-make-an-action-as-the-item-is-clicked/58693/8):
>
> Correct. you click a menu-item you get the menu-data you create an if-else-condition you start a function → regarding the result of → IF-ELSE-CONDITION if(label === 'xyz') {console.log('do something')} else {console.log('do something else');}

---

_[View the full topic](https://forum.wixstudio.com/t/code-to-change-slide-on-page-on-menu-item-click/58743)._
