Add views_infinite_scroll.new_content.appended event

Created on 12 August 2020, almost 5 years ago
Updated 27 June 2025, 8 days ago

Problem/Motivation

Add jQuery event triggered after the newly loaded rows have been appended to the DOM.

Proposed resolution

Add views_infinite_scroll.new_content.appended event trigger.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States robphillips

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

    Yes, there is an event for views_infinite_scroll.new_content. However this is triggered when the content is loaded and BEFORE it is populated in the DOM. Therefore if your custom js relies on the new items being in the DOM you need to use setTimeout() and give it enough time to populate before executing your code.

    the patch in #6 still applies and adds the event views_infinite_scroll.new_content.appended wich triggers after the content is added to the DOM.

    In my use case I am adding slides to a custom carousel script, and I need to refresh the carousel when new slides are added to the DOM.

    Reopening this issue for reconsideration.

Production build 0.71.5 2024