Dont know if this helps, but I just wrote this up really quick. This javascript function would close the TOC - but unlike calling toggletoc(built-in function) , it won't open it if it was already closed.
If you could call this when a table expands, you would ge good to go. But sadly I dont know where the collapsibleTable code is, so im not sure how to do it. function closeTOC(){ //if no TOC, stop if(!document.getElementById('toc')) return; var toc = document.getElementById('toc').getElementsByTagName('ul')[0]; var toggleLink = document.getElementById('togglelink'); changeText(toggleLink, tocShowText); toc.style.display = 'none'; document.cookie = "hidetoc=1"; } On Aug 21, 2010, at 11:30 PM, Frederick Grose wrote: > How would one automatically collapse a page TOC in the event of a NavFrame > or collapsibleTable expansion, such as by adding an option to the > MediaWiki:Common.js ? > > This might be useful where there is a long TOC that shares the page position > of the NavFrame or collapsible table whose expansion moves its content below > the window view because of the TOC size. > > --Fred > _______________________________________________ > MediaWiki-l mailing list > MediaWiki-l@lists.wikimedia.org > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l