On a SharePoint page, I have two web parts: One web part displays root Documents folder and another web part on the side is just a text that provides some tips to users. But when a user clicks on any sub-folder in the Documents web part the tips web part should hide. How to achieve that?

1 Answer 1


I don’t think you can hide the tip web part based on clicking on subfolders since

  1. You cannot ensure the contents to stay the same.

  2. The page gets refreshed every time you click on a subfolder.

However, you can hide a web part with a onclick method with JavaScript. It adds a button to the page and hide the web part when you click the button.

Please see the references below:

Hide SharePoint web part using javascript onclick method.

hide/show webpart data on buttonclick using jquery.

  • Thank you Chelsea. I hope someone either confirms this or suggests a solution(or at least hint)
    – Michael
    Dec 16, 2019 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.