1. First I added the Summary link web part in my page and added the grouping of those links. See in fig
2. Now enable the all group as an Accordion I simply added Script Editor Web part to this page. See in fig
3. Now I am going to making this web part into a fully functional accordion for this I added a simple Jquery script the performs hide all hyperlinks in this groups and when a user clicks a group header, hide all sections that is not the current header and expand current selected link selection. So add the following code
/* Finding the drop down list that corresponds to the current section: */
var dropDown = $(this).next(“.dfwp-list”);
/* Closing all other drop down sections, except the current one */
/* Preventing the default event (which would be to navigate the browser to the link’s address) */
4. Whole code added here. See in fig
5. Now you able to see your web part work as an Accordion. See in figs and compare with the first fig you able to see the changes.
-: FREE PDF e-Book Download :-
51 JSOM Examples in SharePoint Online
You May Also like the Following SharePoint Online Tutorials:
About Navneet Singh
I am Navneet Singh, Working at C3it software solutions pvt. ltd. in Pune. My core skills are SharePoint 2013, Office 365, SharePoint 2010, SharePoint Designer, SharePoint Designer Workflow, Nintex Workflow, Infopath, Webpart, CSOM/SSOM, Power-shell, C#, ASP.NET and SQL Server.
Your FREESharePoint Online Ebook is on its way to your Email Inbox. **************** You will get notification on FREE SharePoint online training, SharePoint webinars, Video Tutorial & also latest FREE PDF tutorials