Sunday, June 23, 2013

Adding accordion in left navigation in sharepoint 2013


 Add this script in your master page

$(function()
{ if($('#sideNavBox .menu-item.selected').length)
{ $('li.static').removeClass('selected');
 $('#sideNavBox .menu-item.selected').parents('li.static').addClass('selected');
 $('#sideNavBox .menu-item.selected').parents('li.static').last().siblings() .find('> ul').hide(); } 
else $('#sideNavBox .root.static > li.static > ul').hide(); 
$('#sideNavBox .root.static > li.static').each(function()
{ if($(this).find('ul').length){ $(this).addClass('father').click(function()
{ if($(this).children('ul').css('display') != 'none')
{ $(this).removeClass('selected').children('ul').slideUp(); } 
 else { 
$(this).siblings().removeClass('selected').children('ul').slideUp(); 
 $(this).addClass('selected').children('ul').slideDown(); 
 } 
 }); 
}
 });
 });

1 comment:

How to Build interactive Design in Power Pages

 Need to Create a design in figma/or any UX tool Create a Power pages site. Create new Page Open page in VS Code in every page there are the...