13.04.2026 | Pascal Crott

Restore AJAX functionality when using Slick Slider and Layout Builder

Uses new Drupal "once" Library without using JQuery (see: https://www.drupal.org/node/3158256).

content-carousel.js
          slick.on('breakpoint', function (e, _) {
            if (settings.isLayoutBuilder) {
              once.remove('ajax', '.use-ajax', _.$slideTrack[0]);
              Drupal.ajax.bindAjaxLinks(_.$slideTrack[0]);
            }
          });

Issue

When you are using Layout Builder, AJAX for a Slick Slider may break.

Prerequisites

Layout Builder with a Slick Slider and Drupal 9.X or newer are in use

Solution

Use the snippet provided to re-bind AJAX events.