script to hide menu after click