Home > Software design >  How to implement dynamic scroll when the user select a menu and its respective card view will be sho
How to implement dynamic scroll when the user select a menu and its respective card view will be sho

Time:12-08

I have a list of vertical menu items and it's respective desription in a same page.By default the first menu is active and it's description is shown.For example When the user clicks fifth menu the menu should highlighted and description related to fifth menu will be displayed.

CodePudding user response:

Give an 'id' to the description you want to show and pass the id of the targeted description to the menu as '' tag inside href this. Below is an example for it. It will scroll to the targeted description.

<a href="#targeted-id">Hello</a>
<div id="targeted-id">Description div You want to target</div>

CodePudding user response:

I have a list of vertical menu items and it's respective desription in a same page.By default the first menu is active and it's description is shown.For example When the user clicks fifth menu the menu should highlighted and description related to fifth menu will be displayed

  • Related