Skip to:
Content
Pages
Categories
Search
Top
Bottom

Activate script only when Activity Stream is completely loaded


  • Studio PeetR
    Participant

    @studio-peetr

    WordPress 5.4.1
    BuddyPress 6.0.0
    Site: http://84.107.187.34/upfrog

    I managed to make the activity stream multi column with third party software “Masonry” (https://masonry.desandro.com).
    The problem I’m facing is calling the masonry-script after the activity stream is completely loaded. For now I used a timeout function to get it working:

    setTimeout(function(){
    $('.activity-list').masonry({
      // options
      itemSelector: '.activity-item',
      columnWidth: 300
    });
    }, 3000);

    Can anyone tell me how to call the script the right way?

    Thanks so much in advance and with kind regards,
    Peter

  • You must be logged in to reply to this topic.
Skip to toolbar