js: fix docs collapse + hide functions glitch