I'm very new in SharePoint and I've received the task to create an internal SharePoint site for our department. I searched a lot on internet regarding a way to add icons to quick launch menu but I cannot find anything from head to tail. For now I used CSS code.
The menu should look like this:
For the moment my result looks like this:
[![enter image description here][2]][2]
I tried to use JQuery, but again I'm new on this also. Can anyone help me with this problem?
Thank you so much for your help.
Hello, For the moment I was able to make the menu to colapse . Unfortunately I was unable to create arrows for the colapseble menu and I cannot add icons. Please , can anyone explain stept by step where should I put these codes for arrow and icons or to update these code accordingly? For the Icons code , I have to create other file or just put the code in the first file ?
Thank you very much for the help !
For now I use one CSS file and one JQuery files linked in Content Editor.
JQuery :
$(function(){ /set dynamic css logic/ if($('#sideNavBox .menu-item.selected').length){ //propagates the selected class, up the three. $('li.static').removeClass('selected'); $('#sideNavBox .menu-item.selected').parents('li.static').addClass('selected');
//collapses top siblings of selected branch $('#sideNavBox .menu-item.selected').parents('li.static').last().siblings() .find('> ul').hide(); } else $('#sideNavBox .root.static > li.static > ul').hide();
/set accordion effect/ $('#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 { /collapse-siblings/ $(this).siblings().removeClass('selected').children('ul').slideUp();
/*expand*/
$(this).addClass('selected').children('ul').slideDown();
}
/*added: stop event propagation to link nodes*/
$('a.static').click(function(event) {
event.stopPropagation();
});
/*added*/
return false;
}); } }); });
CSS :
.ms-core-listMenu-verticalBox UL.root > LI > .menu-item{
font-weight:bold;
background-color:orange;
color:black;
border-bottom-color:black;
border-bottom-style:solid;
border-bottom-width:1px;
min-height:12px;
padding-top:5px;
padding-left:10px;
font-size:12px;
font-family:Arial, Helvetica, Sans-Serif !important;
}
.ms-core-listMenu-verticalBox > ul.root > li.static > ul.static > li.static > a:hover {
color: white !important;
background-color:grey !important;
text-decoration:none;
}
.ms-core-listMenu-verticalBox > ul.root > li.selected > a {
background-image:none;
background-color:#D95E00;
color:#ffffff !important;
}
.ms-core-listMenu-verticalBox > ul.root > li > a:hover {
background-image:none;
background-color:#D95E00;
color:#ffffff !important;
text-decoration:underline;
}
.ms-core-listMenu-verticalBox > ul.root > li.static > ul.static > li > a {
font-size:12px;
padding-left:10px;
font-family:Arial, Helvetica, Sans-Serif !important;
}
.ms-core-listMenu-verticalBox > ul.root > li.static > ul.static > li > a.selected {
background:none;
color: #D95E00 !important;
background-color:#ffffff !important;
text-decoration: none;
border: 1px #fff solid;
font-weight:bold;
}
.ms-core-listMenu-verticalBox a.selected
{
border: 1px #fff solid !important;
}
.ms-core-listMenu-verticalBox UL.root UL
{
margin:0px 0px 10px 0px !important;
}