Hi,
Hoping someone can help me with this one!
I'm after some JavaScript code that will filter my table of contents so that only sites and sub-sites are visible. I have 3 levels visible via the web part from I need and the table of contents is also showing all the other stuff from the quick launch which I di not want people to see.
The code I have at the moment which is not working is attached.
<script language="JavaScript" type="text/javascript"> // This script removes lists, libraries and discussions from Table of Contents var links = document.body.getElementsByTagName("a"); for(ii=0; ii<links.length; ii++) { if(links[ii].outerHTML.indexOf("BaseType") != -1 && links[ii].parentNode.parentNode.parentNode.parentNode.className == "level-section") { links[ii].parentNode.parentNode.parentNode.parentNode.style.display = "none"; } } </script>
Thanks!
Clare