Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function ajax_get_update()
- {
- $.get(url, function(results){
- //get the parts of the result you want to update. Just select the needed parts of the response
- var table = $("table", results);
- var page = $(".pagination", results);
- $('table').html(table);
- $('.pagination').html(page);
- }, "html");
- }
- $(document).on('click', '#previous_page', function(e) {
- console.log("Previous button Debuggin...");
- e.preventDefault();
- url = ($( '#previous_page' )[0].href);
- ajax_get_update();
- });
- $(document).on('click', '#next_page', function(e) {
- console.log("Next button Debuggin...");
- e.preventDefault();
- url = ($( '#next_page' )[0].href);
- ajax_get_update();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement