From a00dbfdbf8eb21b100aa8fd4a2cf1e54f1576d49 Mon Sep 17 00:00:00 2001 From: Karl Cordes Date: Thu, 17 Mar 2011 11:02:23 +1100 Subject: [PATCH] AJAX pagination working on Enquiry table on user views --- webroot/js/ajax_pagination.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 webroot/js/ajax_pagination.js diff --git a/webroot/js/ajax_pagination.js b/webroot/js/ajax_pagination.js new file mode 100644 index 00000000..f446e521 --- /dev/null +++ b/webroot/js/ajax_pagination.js @@ -0,0 +1,25 @@ +$(function() { + + + $(".paging").find('a').click(function() { + + $('#enquiryTable').fadeOut('slow'); + + $("#ajaxLoad").bind("ajaxSend", function() { + $(this).show(); + }).bind("ajaxComplete", function() { + $(this).hide(); + }); + + $.get($(this).attr('href'), function(data) { + $('#enquiryTable').html(data); + $('#enquiryTable').fadeIn('slow'); + }); + + + return false; + }) + + +}); +