Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#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);
- if (window.discoverMode != "list"){
- $container.append( newItems ).isotope( 'appended',newItems);
- }else{
- for ( var i = 0, l = newItems.length; i < l; i++ ) {
- $(newItems[i]).removeClass( "grid col-md-4 col-sm-4 " ).addClass( "list" );
- }
- $container.append( newItems ).isotope( 'appended',newItems);
- }
- $button.button('reset');
- }
- });
- ev.preventDefault();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement