Hi,
I was using the Expand.js function to create an accordion on the search page and I came across a bug in the function.
The funcion loops through all the .js-handlebars-root, but only adds the EventListener to the last.
See the video here:
https://www.screencast.com/t/TPqYz78o
This is how I solved the issue:
document.addEventListener("DOMContentLoaded", function (event) { if (RememberState == null) { Expand.initExpandTriggers(); } //Make it work with Ajax loaded content var ajaxContainer = document.getElementsByClassName("js-handlebars-root"); if (ajaxContainer.length > 0) { for (var i = 0; i < ajaxContainer.length; i++) { ajaxContainer[i].addEventListener('contentLoaded', function (e) { Expand.initExpandTriggers(this); // <----- bug fix in this line }, false); } } });