Js for sliding animation on navigation btn click