I am using the jqPagination from Ben Everard. It's a nice plugin and saved me coding pagination logic.
I have a search and a button ,when a user enters a value and clicks the button I do Ajax search and the following to update the paginator:
$('#search-by-quote-id-paginator').jqPagination('option', 'current_page', 1);
$('#search-by-quote-id-paginator').jqPagination('option', 'max_page', totalpages);
(This required because on the screen the paginator may be showing the "page x of xxx". Since the user has launched a new search by entering in the search box and pressed the button. )
However each of those lines triggers a page: event and my page: function gets executed. How can I turn off triggering of the "page:" event selectively , I want it to happen only on the following line:
$('#search-by-quote-id-paginator').jqPagination('option', 'current_page', 1);
so I want to turn it off for the following line
$('#search-by-quote-id-paginator').jqPagination('option', 'max_page', totalpages);
Thanks !
Harinder