Details
-
Improvement
-
Resolution: Won't Fix
-
Major
-
None
-
5.4.6
-
None
-
Easy
-
Description
I always find problems to customize the menu because it haven't specific classes
The idea is to generate a different classes to the liste " li " of the menu and for the " ul " of submenu to make it easy to customize and allows us to go far in the css customization.
for example the code generated should be like this:
<ul> <li class="item1"></li> <li class="item2"></li> <li class="item3"> <ul class="SubMenu1"> <li class="item1"></li> <li class="item2"></li> <li class="item3"></li> </ul> </li> <li class="item4"> <ul class="SubMenu2"> <li class="item1"></li> <li class="item2"></li> <li class="item3"></li> </ul> </li> </ul>
i have did this in my project and it's what i need :
$( ".menu-horizontal>ul>li" ).addClass(function( index ) { return "item-" + index;}); $( ".menu-horizontal ul ul" ).addClass(function( index ) { return "subMenu-" + index;}); $( ".menu-horizontal ul ul li" ).addClass(function( index ) { return "subItem-" + index;});