- Source:
Attaches behaviors for Drupal's active link marking.
$('#search-list')
.on('itemInsert', function (event, data) {
// Insert the new items.
$(data.container.el).append(data.items.el);
// Announce the change to the page contents.
Drupal.announce(Drupal.t('@count items added to @container',
{'@count': data.items.length, '@container': data.container.title}
));
});
once('core-once-call', 'body');
// The following will work in a contrib module still using jQuery.once:
$('body').once('core-once-call'); // => returns empty object