Site structure
Version 5.x > Site structure > Create custom submenu View modes: 
User avatar
Member
Member
doppiaemme83-gmail - 10/21/2011 3:38:26 AM
   
Create custom submenu
Hello folks,
i must create a submenu on my horizontal menu.
I've an horizontal menu, when i click an item i would to create a submenu( which is popolated in cms desk) dinamically under the main menu by jQuery with this code:

<script type="text/javascript">
$j('#nav>ul>li>a').click(function () {
$j('#nav>ul>li>a').removeClass("select");
$j(this).addClass("select");
$j('#subMenu>ul').hide();
$j('#sub' + $j(this).attr('id')).show();
});

$j('#fixed').hide();
$j('#liquid').hide();
</script>

i use this code to create this effect in a <ul><li> structure.
thanks

Marco

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 10/23/2011 8:03:42 AM
   
RE:Create custom submenu
Hello,

I would recommend you to create a CSS based menu rather a JavaScript one. This is better from accessibility point of view. Please take a look at small demonstration with the CSS List Menu web part: http://devnet.kentico.com/docs/6_0/controls/cmslistmenu_appearance_and_styling_horizontal_menu.htm.

Best regards
Ondrej Vasil