Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Load more updates at the end of the page */
- if ( target.parent().hasClass('load-more') ) {
- jq("#content li.load-more").addClass('loading');
- if ( null == jq.cookie('bp-activity-oldestpage') )
- jq.cookie('bp-activity-oldestpage', 1, {
- path: '/'
- } );
- var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1;
- var just_posted = [];
- jq('.activity-list li.just-posted').each( function(){
- just_posted.push( jq(this).attr('id').replace( 'activity-','' ) );
- });
- jq.post( ajaxurl, {
- action: 'activity_get_older_updates',
- 'cookie': bp_get_cookies(),
- 'page': oldest_page,
- 'exclude_just_posted': just_posted.join(',')
- },
- function(response)
- {
- jq("#content li.load-more").removeClass('loading');
- jq.cookie( 'bp-activity-oldestpage', oldest_page, {
- path: '/'
- } );
- jq("#content ul.activity-list").append(response.contents).trigger('post-load');
- target.parent().hide();
- }, 'json' );
- return false;
- }
- });
Add Comment
Please, Sign In to add comment