Advertisement
sastranababan

Untitled

Nov 3rd, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // change button html to this
  2. <button class="btn btn-simple center-block" data-loading-text="Loading..." autocomplete="off" id="more-charity">Load More </button>
  3.  
  4.  
  5. // javascript
  6.  
  7.                 $('#more-charity').click(function (ev) {
  8.  
  9.                    var form = $('#charity-form');
  10.                    var $container = $('#charity-result');
  11.                    var $button= $(this).button('loading');  
  12.                     $.ajax({
  13.                         type: "GET",
  14.                         cache: false,
  15.                         url: "http://localhost/simplygiving/data/charities.dta",
  16.                         success: function (response) {
  17.                           var $container = $('#charity-result');
  18.                           newItems=$(response);
  19.                           $container.append( newItems ).isotope( 'appended',newItems);  
  20.                           $button.button('reset');
  21.                         }
  22.  
  23.                         });
  24.  
  25.                     ev.preventDefault();
  26.  
  27.                 });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement