Hi,
I have a javascript written for Expanding/Collapsing the quick launch.It work's fine.
But the problemn is that i have some quick launch menu's without Sub-Menus(EG:Root2),So those which does not have the sub-menu I want the root menu to be redirected.The sub-Menu redirection is working Fine.
For Example:
Root1
->Sub Menu 1
->Sub Menu 2
Root2
Root3
->Sub Menu 1
Javascript:
<script type="text/javascript">
$(document).ready(function () {
$("div.menu-vertical>ul.root>li.static>a").toggle(
function () {
$(">ul", $(this).parent()).show("fast");
},
function () {
$(">ul", $(this).parent()).hide("fast");
}
);
$("div.menu-vertical>ul.root>li.static>ul.static").css("display","none");
var s = $("div.menu-vertical>ul.root>li.static>ul.static>li.selected").parent();
var p=s.parent();
p.find('ul').css("display","");
p.find('li').css("color","red");
});
</script>
Thanks