Skip to content

Commit

Permalink
#167 wait for finish scrolling before initialize players
Browse files Browse the repository at this point in the history
  • Loading branch information
ephes committed Oct 30, 2024
1 parent 6b9b46a commit 56d34ae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cast/templates/cast/bootstrap4/blog_list_of_posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,11 @@ <h5 class="mb-0">
});
}

document.body.addEventListener('htmx:afterSwap', (event) => {
document.body.addEventListener('htmx:afterSettle', (event) => {
if (event.detail.target.id === 'paging-area') {
initializePodlovePlayers();
setTimeout(() => {
initializePodlovePlayers();
}, 1500); // Adjust the delay as needed -> wait to finish scrolling up
}
});

Expand Down

0 comments on commit 56d34ae

Please sign in to comment.