diff --git a/core/misc/ajax.js b/core/misc/ajax.js
index bd17811..c35241c 100644
--- a/core/misc/ajax.js
+++ b/core/misc/ajax.js
@@ -21,23 +21,18 @@ Drupal.behaviors.AJAX = {
   attach: function (context, settings) {
     // Load all Ajax behaviors specified in the settings.
     for (var base in settings.ajax) {
-      if (!$('#' + base + '.ajax-processed').length) {
-        var element_settings = settings.ajax[base];
-
-        if (typeof element_settings.selector == 'undefined') {
-          element_settings.selector = '#' + base;
-        }
-        $(element_settings.selector).each(function () {
-          element_settings.element = this;
-          Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
-        });
-
-        $('#' + base).addClass('ajax-processed');
+      var element_settings = settings.ajax[base];
+      if (typeof element_settings.selector == 'undefined') {
+        element_settings.selector = '#' + base;
       }
+      $(element_settings.selector).once('drupal-ajax', function() {
+        element_settings.element = this;
+        Drupal.ajax[element_settings.selector] = new Drupal.ajax(base, this, element_settings);
+      });
     }
 
     // Bind Ajax behaviors to all items showing the class.
-    $('.use-ajax:not(.ajax-processed)').addClass('ajax-processed').each(function () {
+    $('.use-ajax').once('ajax', function () {
       var element_settings = {};
       // Clicked links look better with the throbber than the progress bar.
       element_settings.progress = { 'type': 'throbber' };
@@ -53,7 +48,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', function () {
       var element_settings = {};
 
       // Ajax submits specified in this manner automatically submit to the
diff --git a/core/modules/color/color.js b/core/modules/color/color.js
index 6ed789a..d833a4b 100644
--- a/core/modules/color/color.js
+++ b/core/modules/color/color.js
@@ -19,7 +19,7 @@ Drupal.behaviors.color = {
     var focused = null;
 
     // Add Farbtastic.
-    form.prepend('<div id="placeholder"></div>').addClass('color-processed');
+    $('<div id="placeholder"></div>').once('color').prependTo(form);
     var farb = $.farbtastic('#placeholder');
 
     // Decode reference colors to HSL.
diff --git a/core/modules/openid/openid.js b/core/modules/openid/openid.js
index 0e673f3..8ba13d3 100644
--- a/core/modules/openid/openid.js
+++ b/core/modules/openid/openid.js
@@ -8,23 +8,23 @@ Drupal.behaviors.openid = {
     var cookie = $.cookie('Drupal.visitor.openid_identifier');
 
     // This behavior attaches by ID, so is only valid once on a page.
-    if (!$('#edit-openid-identifier.openid-processed').length) {
+    $('#edit-openid-identifier').once('openid', function () {
+      var $that = $(this);
       if (cookie) {
-        $('#edit-openid-identifier').val(cookie);
+        $that.val(cookie);
       }
-      if ($('#edit-openid-identifier').val() || location.hash == '#openid-login') {
-        $('#edit-openid-identifier').addClass('openid-processed');
+      if ($that.val() || location.hash == '#openid-login') {
         loginElements.hide();
         // Use .css('display', 'block') instead of .show() to be Konqueror friendly.
         openidElements.css('display', 'block');
       }
-    }
+    });
 
-    $context.find('li.openid-link:not(.openid-processed)')
-      .addClass('openid-processed')
+    $context.find('li.openid-link')
+      .once('openid')
       .click(function () {
-         loginElements.hide();
-         openidElements.css('display', 'block');
+        loginElements.hide();
+        openidElements.css('display', 'block');
         // Remove possible error message.
         $('#edit-name, #edit-pass').removeClass('error');
         $('div.messages.error').hide();
@@ -32,11 +32,11 @@ Drupal.behaviors.openid = {
         $('#edit-openid-identifier')[0].focus();
         return false;
       });
-    $context.find('li.user-link:not(.openid-processed)')
-      .addClass('openid-processed')
+    $context.find('li.user-link')
+      .once('openid')
       .click(function () {
-         openidElements.hide();
-         loginElements.css('display', 'block');
+        openidElements.hide();
+        loginElements.css('display', 'block');
         // Clear OpenID Identifier field and remove possible error message.
         $('#edit-openid-identifier').val('').removeClass('error');
         $('div.messages.error').css('display', 'block');
