Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I use #ahah binding to a form element to modify a #ahah[‘wrapper’] HTML div. It contains a ‘slider’ div for the EasySlider jQuery UI plugin. This div contains a list where each list item represents one slide. When the ahah event is triggered, the wrapper HTML is replaced by a new set of slides.
When the form loads the slider works fine.
Here’s the problem: when the ahah event is triggered the jQuery no longer works. The new slides display one below the other, no animation. Shouldn’t the jQuery function be called automatically, or what is needed to make the call?
Comments
Comment #1
jpdaut CreditAttribution: jpdaut commentedHere's the solution, hope this helps others. In your .js file, insert:
$(document).ajaxComplete(function(e, xhr, settings) {
$("#slider").easySlider({
auto: true,
continuous: true
});
});
Comment #2
nod_Version for Drupal 6 is not supported anymore, closing.