DataTable – 禁用分页

我需要做以下事情:

$("#example").on( 'page.dt', function () { if ($("#txtField6").length){ alert("You must finish operation new/edit. The pagination is not posible"); //when i press the buttons navigation, if this condition is met, I must stay on the same page, what can i do it? } }); 

解决方案:

 tbLoc.page(page.info());