Trigger a JS function only if the view has no more results. or is empty?
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