diff --git a/core/misc/ajax.js b/core/misc/ajax.js index 5001554..2ec047b 100644 --- a/core/misc/ajax.js +++ b/core/misc/ajax.js @@ -36,7 +36,7 @@ if (typeof element_settings.selector === 'undefined') { element_settings.selector = '#' + base; } - $(element_settings.selector).once('drupal-ajax').each(function () { + $(element_settings.selector, context).once('drupal-ajax').each(function () { element_settings.element = this; element_settings.base = base; Drupal.ajax(element_settings); @@ -51,7 +51,7 @@ } // Bind Ajax behaviors to all items showing the class. - $('.use-ajax').once('ajax').each(function () { + $('.use-ajax', context).once('ajax').each(function () { var element_settings = {}; // Clicked links look better with the throbber than the progress bar. element_settings.progress = {type: 'throbber'}; @@ -71,7 +71,7 @@ }); // This class means to submit the form to the action using Ajax. - $('.use-ajax-submit').once('ajax').each(function () { + $('.use-ajax-submit', context).once('ajax').each(function () { var element_settings = {}; // Ajax submits specified in this manner automatically submit to the