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'm using the InfiniteScroll jQuery plugin to add items to my page when scrolling to the bottom of the page. This works fine, except for the contextual links. They are processed on a page load, but they don't detect new items. Can we use live() here?
Drupal.behaviors.contextualLinks = {
attach: function (context) {
$('div.contextual-links-wrapper', context).once('contextual-links', function () {
// Added just once, sad puppy.
});
}
};
Comments
Comment #1
Wim LeersIsn't
live()
bad for performance? In any case, this is fixed in D8.Also: the title is very vague. Improved that :) And it's probably a bug.