Index: misc/ajax.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/ajax.js,v
retrieving revision 1.27
diff -u -p -r1.27 ajax.js
--- misc/ajax.js	25 Oct 2010 00:23:47 -0000	1.27
+++ misc/ajax.js	26 Oct 2010 16:38:31 -0000
@@ -35,7 +35,7 @@ Drupal.behaviors.AJAX = {
     }
 
     // Bind AJAX behaviors to all items showing the class.
-    $('.use-ajax:not(.ajax-processed)').addClass('ajax-processed').each(function () {
+    $('.use-ajax').once('ajax-processed', function () {
       var element_settings = {};
 
       // For anchor tags, these will go to the target of the anchor rather
@@ -49,7 +49,7 @@ Drupal.behaviors.AJAX = {
     });
 
     // This class means to submit the form to the action using AJAX.
-    $('.use-ajax-submit:not(.ajax-processed)').addClass('ajax-processed').each(function () {
+    $('.use-ajax-submit').once('ajax-processed', function () {
       var element_settings = {};
 
       // AJAX submits specified in this manner automatically submit to the
@@ -60,8 +60,9 @@ Drupal.behaviors.AJAX = {
       element_settings.setClick = true;
       // Form buttons use the 'click' event rather than mousedown.
       element_settings.event = 'click';
-      // Clicked form buttons look better with the throbber than the progress bar.
-      element_settings.progress = { 'type': 'throbber' };
+      // Clicked form buttons look better with the throbber than the progress
+      // bar.
+      element_settings.progress = { type: 'throbber' };
 
       var base = $(this).attr('id');
       Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
