Issue: GSAP Animations Break After AJAX Filtering (Bricks + Bricksforge)

Hi team,

I’m currently using Bricksforge to animate cards on my website using GSAP timelines triggered on hover (e.g. .article-card triggering animations on .article-content-wrappe and .article-exerpt).

Everything works perfectly on page load.

However, when I apply a filter using Bricks’ native filtering (which updates the content via AJAX, e.g. ?_post-date=date_DESC), the new DOM elements are injected correctly, but the GSAP animations are no longer active. The triggers and animations don’t re-initialize.

I’ve tried the following:

  • Using BricksforgeFrontend.reinitGsap() after the bricks/ajaxComplete event → no result.
  • Manually re-triggering the animations (but there’s no global function available since Bricksforge doesn’t expose them by default).
  • Rebuilding the DOM via .load() or full page reload (works, but not ideal UX-wise).

It seems Bricksforge doesn’t currently detect or re-bind animations when Bricks replaces elements via AJAX.

Let me know if there’s a current workaround I’m missing or if this is something planned in the roadmap.

Thanks for the great work so far — Bricksforge is amazing!

Hey :slight_smile:

Something like BricksforgeFrontend.reinitGsap() does not exist in the Bricksforge core. ChatGPT hallucinations? :stuck_out_tongue:

Could you try this one: new BricksforgePanel() ?

Something like:

document.addEventListener("bricks/ajax/query_result/completed", (event) => {
  new BricksforgePanel();
});

If that not works, sharing an URL would be very helpful! :slight_smile:

Hahah Yes it was indeed a ChatGPT suggestion based on how similar tools handle reinitializing after AJAX events.

i’ve tried :slight_smile:

document.addEventListener("bricks/ajax/query_result/completed", (event) => {
  new BricksforgePanel();
});

and it works ! thank you for quick support !

Great. Thanks for letting me know :slight_smile: I`ll include the fix in the next update :slight_smile:

1 Like