I'm trying to change a global setting for Drupal's js. I have this on my callback:
$setting['stopWatch']['startTime'] = 4000;
ajax_command_settings($setting, TRUE),
I was wondering how I would reattach this behavior after the ajax call is finished. I have this for my js:
Drupal.behaviors.stopWatch = {
attach: function (context, settings) {
$('#stopwatch').stopwatch({startTime: settings.stopWatch.startTime}).stopwatch('start');
}
};
Also, I'm not sure why startTime
isn't available in settings on Drupal.behaviors.stopWatch
when I do ajax_command_settings($setting);
instead.