js to Collapse top menu on mobile when anchortags are clicked