Skip to:
Content

BuddyPress.org

Changeset 8413


Ignore:
Timestamp:
05/10/2014 03:41:09 PM (10 years ago)
Author:
boonebgorges
Message:

Abort duplicate AJAX requests if Activity > Load More is clicked multiple times in succession

Fixes #5546

Props needle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/js/buddypress.js

    r8410 r8413  
    393393        /* Load more updates at the end of the page */
    394394        if ( target.parent().hasClass('load-more') ) {
     395            if ( bp_ajax_request ) {
     396                bp_ajax_request.abort();
     397            }
     398
    395399            jq('#buddypress li.load-more').addClass('loading');
    396400
     
    408412            });
    409413
    410             jq.post( ajaxurl, {
     414            bp_ajax_request = jq.post( ajaxurl, {
    411415                action: 'activity_get_older_updates',
    412416                'cookie': bp_get_cookies(),
Note: See TracChangeset for help on using the changeset viewer.