Hi all,
I have been using this tutorial: bootply.com
and I almost have it working, the problem is that my table is generated VIA AJAX from a php file. Basically I see my table but no working pagination unless I open chrome web tools and go to console and paste the following line:
$('#myTable').pageMe({pagerSelector:'#myPager',showPrevNext:true,hidePageNumbers:false,perPage:4});
My javascript in my document is nested within a $(document).ready(function(){});
and I have the ajax call to generate the table first followed by the call to call the pagination function. Attached at the bottom is my full code VIA pastebin. Is there anyway I can get this function to work with my project or is there a different method of pagination that you would recommend. This is my first time digging into pagination so I am fairly new.
I think the problem is that the function that I show above is being called and doesn't realize there is a table there because in the html there are no rows because it needs to be generated first with ajax. When execution of the page has stopped and the information is there and I run it via console it works as I said. I believe I could make a button that says generate table that when clicked will generate the table by calling that function but I would much rather it be automatic.
Source Code