Update script.js to collapse menu upon menu selection