Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can expand navigation menu using JQuery..

Main menu1 image
submenu1
submenu2
submenu3
Main menu2 image
submenu1
submenu2
submenu3

when i click in image than only expand the sub menu items. And when i click on Main menu1 text than redirect into some other page.
please any one help me...

main menu1 and image are in same angar tag..

example

Posted
Updated 10-May-12 20:18pm
v4

1 solution

You have to give 2 different id/class to your image and Main menu1 text. When the image is click set "display" property for submenu, when mainmenu1 is click then jump to new url. I have create jquery for more understanding.
JavaScript
$(document).ready(function () {
           $("#img").click(function () {
               $("#submenu").css({ "display": "block" });
           });
           $("#mainmenu1").click(function () {
               location.href = "//localhost:1787/Table/Index/";
           });

       });
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900