Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: sharepoint2010
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
Posted 13-Nov-12 20:30pm

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 668
1 OriginalGriff 396
2 Tadit Dash 345
3 sanket saxena 329
4 Peter Leow 193
0 Sergey Alexandrovich Kryukov 12,109
1 OriginalGriff 7,326
2 Peter Leow 5,003
3 Abhinav S 4,003
4 Maciej Los 3,575


Advertise | Privacy | Mobile
Web04 | 2.8.140421.2 | Last Updated 14 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid