Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // change button html to this
- <button class="btn btn-simple center-block" data-loading-text="Loading..." autocomplete="off" id="more-charity">Load More </button>
- // javascript
- $('#more-charity').click(function (ev) {
- var form = $('#charity-form');
- var $container = $('#charity-result');
- var $button= $(this).button('loading');
- $.ajax({
- type: "GET",
- cache: false,
- url: "http://localhost/simplygiving/data/charities.dta",
- success: function (response) {
- var $container = $('#charity-result');
- newItems=$(response);
- $container.append( newItems ).isotope( 'appended',newItems);
- $button.button('reset');
- }
- });
- ev.preventDefault();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement