I’ve a search outcome web page, with Drupal Development Company first set of knowledge being fetched throughout Drupal Development Company web page load, and we add a Load Extra button. Clicking on this button fires an AJAX name, utilizing Drupal Development Company ajax_links_api module. After Drupal Development Company AJAX name is accomplished, we append extra search outcomes to Drupal Development Company present set. I’ve a conduct the place I learn Drupal Development Company URL parameter; if it exists, I open a Colorbox.
If Drupal Development Company colorbox opens on web page load, we shut it, after which click on on Load Extra (which fires AJAX); then Drupal Development Company Colorbox JavaScript is fired once more, and we see Drupal Development Company popup in motion once more.
I do not wish to hearth Drupal Development Company Colorbox JavaScript after AJAX is accomplished/fired.
I attempted jQuery As soon as, nevertheless it did not work.
How can I obtain this? Can I detect when an AJAX name occurs?
Drupal Development Company following is Drupal Development Company code I’m utilizing.
Drupal.behaviors.openColorbox = { connect: operate (context, settings) { if ($('physique', context).hasClass('page-search-site')) { var nid = url('?node'); if (nid != undefined) { if (nid.trim()) { $('div.search-result') .discover('.node-' + nid) .as soon as('colorbox-clicked') .click on(); } } } } };