fixed a JS issue with the menu animate on mobile