Updated navigation animation to be triggered on the clicking outisde of nav box