To run some jQuery code before the Ajax button submit use beforeSubmit function
Drupal.behaviors.exampleModule = {
attach: function (context, settings) {
// ELEMENT_ID must not include the #
Drupal.ajax['ELEMENT_ID'].options.beforeSubmit = function(form_values, element_settings, options) {
// code here
};
}
};
Thank you for sharing this amazing information. Looking forward to read more.
ReplyDeleteBest Web Development Company