JS for refreshed TOC