JS issue fixed missing prev next link is element is not visible