Pagination code to make next button hide when total is less than limit
I am working with pagination and I am trying to get the "next" button to show at the bottom of the page if the search results have more than 100 items. I have a service that counts the results of my query and i have tested the results of this with a mapping and it does put out the correct number. I have put this bit of java anywhere i can think of it working but it does not show the next button in the proper instances. I have tried to put it at the end of the success event. The count is mapped to the local storage string "total" and the button is hidden when the search is started. Any help would be great. thanks
Side note: I have followed the pagination tutorial on the next and previous button with similar code as below and they work just fine. Thanks
var Total = parseInt(localStorage.getItem('total'));
var Limit = parseInt(localStorage.getItem('limit'));
if (Total Limit) {
Apperyio('search2_pageChange_title').show();
}