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.
It's possible Drupal.attachBehaviors will be called after page load by other modules which may be using jquery to add elements to the DOM.
First the slider behavior should restrict its selections by the context variable.
Also, it probably makes sense to add a "processed" class to avoid re-initialing the same slider if a module passes the document context when calling attachBehaviors.
Attached is a patch which does this.
Comment | File | Size | Author |
---|---|---|---|
views_nivo_slider-behaviors-context.patch | 715 bytes | krlucas | |
Comments
Comment #1
bomarmonk CreditAttribution: bomarmonk commentedI'm using a flash audio player and megamenus on my front page. Every now and then, the slider doesn't load properly, or the menu animation fails on my home page with the nivo slider (this last issue seems to happen with Safari only). Could this patch fix this problem?