function rotateIconMenu(key) {
...
}
function displaySubMenuItems(k) {
...
}
.menu-part{
margin-top: 120px;
}
.menu-parent{
color: #a6afbb;
font-size: 13px;
...
}
<ul class="menu-part">
<li>
<ul class="menu-parent">--- MAIN MENU
<li class="sub-menu-parent" id="sub-menu-one" onclick="displaySubMenuItems(1);rotateIconMenu(1);"><i class="flip-menu-main-icon fa fa-sun-o"></i><span class="sub-menu-header">Dashboard</span> <i id="first-drop-down-icon" class="spinner-icon in fa fa-chevron-right"></i>
<ul id="sub-menu-one" class="sub-menu">
...
</li>
...
</ul>
In the above code, I have implemented a drop-down menu with two functionalities. When clicking on a menu item:
- The icon associated with each menu item rotates 90 degrees successfully.
- The sub-menu items associated with the corresponding menu item should be displayed (not working).
I have added an alert message inside the JavaScript code to debug any potential issues, but it seems to be functioning correctly. I am looking for ways to resolve this error. How can I fix this?