This is a migrated thread and some comments may be shown as answers.

Responsive Panel, Toggle Button Click

4 Answers 390 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ricky
Top achievements
Rank 1
Ricky asked on 26 Mar 2020, 06:33 PM

I have two responsive panels in the page which then collapse into two "hamburger" menus. The problem that I have is when I click on one "hamburger" menu both of them expand. How do you go about expanding each "hamburger" menu separately?

For background, I have created a default website and added a page with the same code as found at this link. 

https://demos.telerik.com/aspnet-mvc/responsive-panel

The first "hamburger" menu is the default menu items of a web site and the second "hamburger" menu is generated by the code used from the above link.

I have also uploaded a screenshot for reference. What am I missing?

Thank you,

Ricky

 

4 Answers, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 30 Mar 2020, 03:18 PM

Hello Ricky,

Thank you for the provided screenshot.

Based on the shared information, I am not able to say what might be causing the reported behavior. Would it be possible to prepare a small project that demonstrates the issue? I will be able to debug it and find out what is reason for the problem. If that is not possible, please share some code snippets of the components which are relevant to reproducing the issue and how the menus are being expanded. 

Looking forward to your reply.

Regards,
Martin
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Ricky
Top achievements
Rank 1
answered on 30 Mar 2020, 06:04 PM

Martin,

I have attached a full project. Note when you click any one hamburger menu they both open or close. I would like to keep the actions separate.... the corresponding hamburger menu will open when clicked.

Thanks.

0
Accepted
Martin
Telerik team
answered on 01 Apr 2020, 02:17 PM

Hello Ricky,

Thank you so much for the provided example.

The reason for the behavior is because the buttons share the same classes, so clicking one of them makes both panels open/close. To solve that, you can add a toggleButton for each Responsive Panel, each with an Id.

Attached you will find the modified example for reference.

Let me know if you have any questions.

Regards,
Martin
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Ricky
Top achievements
Rank 1
answered on 02 Apr 2020, 12:49 PM

Mark,

Thank you for the attached example. I think I understand. Each button gets its own Id and then with .the "toggle-button" you reference each individual button, thus keeping them separate from each other.

Thank you.

Tags
General Discussions
Asked by
Ricky
Top achievements
Rank 1
Answers by
Martin
Telerik team
Ricky
Top achievements
Rank 1
Share this question
or