1

Hi this might be a stupid question but i can't seem to work it out.

I'm using 'views ajax get', 'views load more (with waypoints)' and what i'm trying to achieve is to only display the footer when the last page of the view has been loaded and appended to the page. and if the view returns no results (using exposed filters)

I've attempted to use jquery's .ajaxSuccess() but i cant work out how to count the results or even to locate the variable with results. Do i have to search the responseJSON for results

What is the best way to do this? is there some Drupal specific structure i need to know about?

Thank in advance :D

0

All you have to do is check if the "load more" div does not exist. (check if the load more button is no longer there).

(function ($) {
    $(document).ajaxComplete(function() { 
               if ($(".loadmore").length = 0){
                   // do something here
               }
    });

})(jQuery);

Check the actual name of the load more div, I just made it up for this example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.