hiding the next and previous buttons when on the last or first page, respectively; Also hinding the pagination if none or only one page