Click here to Skip to main content
15,891,851 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a few webParts on a SharePoint site, most of them are fairly long lists, e.g. a list of contacts / documents etc. What I want to be able to do is collapse the whole part, so the screen isn't filled with the list unless the user wants to view the whole lot. I.e. collapse and expand it. I have seen a few solutions, but being a SharePoint novice I am struggling as to where to put the code and get it all working.

Many thanks in advance.

What I have tried:

The following is a site I have just been trying to follow, but I don't know where the html part is that they are editing. Hopefully someone will be able to provide a step by step to assist me.

tp://www.sharepointdiary.com/2014/10/expand-collapse-web-parts-in-sharepoint-using-using-jquery.html[^]
Posted
Updated 25-Jul-17 2:51am

1 solution

You need to add content editor or script editor webpart in the site where you have these long lists. In that webpart you need to add the code from the site you provide.

I have used same code in my test site home page. You can check it here:

[code demo]

Let me know if you have any other query.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900