diff --git a/cck_select_other.js b/cck_select_other.js
index e744177..96716b8 100644
--- a/cck_select_other.js
+++ b/cck_select_other.js
@@ -1,40 +1,35 @@
-
+//$Id$
 /**
- *  cck_select_other javascript file 
+ * @file
+ * cck_select_other javascript file 
  */
 
 (function ($) {
   Drupal.behaviors.cckSelectOther = {
     attach: function (context, settings) {
 
-      //document.write(Drupal.settings.CCKSelectOther.field.length);
-      var field_str = new String(settings.CCKSelectOther.field);
-      var lang = new String(settings.CCKSelectOther.lang);
-      var delta = new String(settings.CCKSelectOther.delta);
-      var field = field_str.replace(/_/g, '-');
+      // Prevent errors
+      if (typeof settings.CCKSelectOther != 'object') return;
 
-      var selectId = '#edit-field-' + field + '-' + lang + '-' + delta + '-select-other-list';
-      var inputId = '#edit-field-' + field + '-' + lang + '-' + delta + '-select-other-text-input';
-      var value = $(selectId + ' option:selected').val();
+      $.each(settings.CCKSelectOther, function(n,MyCCKSelectOther){
 
-      $(document).ready( function() {
-        value = $(selectId + ' option:selected').val();
-        $(inputId).css('display', (value == "other") ? 'block' : 'none');
+        // Prevent errors
+        if (typeof MyCCKSelectOther.field == 'undefined') return;
 
-      });
+        var field_str = new String(MyCCKSelectOther.field);
+        field_str = field_str.replace(/_/g, '-');
+        var lang = new String(MyCCKSelectOther.lang);
+        var delta = new String(MyCCKSelectOther.delta);
+        var field_id = '#edit-field-' + field_str + '-' + lang + '-' + delta + '-select-other';
+        var ActionBind = (($.browser.msie == true) ? 'click' : 'change');
 
-      if ($.browser.msie == true) {
-        $(selectId).click( function() {
-          value = $(selectId + ' option:selected').val();
-          $(inputId).css('display', (value == "other") ? 'block' : 'none');
+        $(document).ready( function() {
+          $(field_id+'-list').bind(ActionBind,function() {
+            // Add parent() to hide input wrapper
+            $(field_id+'-text-input').parent().css('display', ($(this).val() == "other") ? 'block' : 'none');
+          }).trigger(ActionBind);
         });
-      }
-      else {
-        $(selectId).change( function() {
-          value = $(selectId + ' option:selected').val();
-          $(inputId).css('display', (value == "other") ? 'block' : 'none');
-        });
-      }
+      });
     }
   }
 })(jQuery);
diff --git a/cck_select_other.module b/cck_select_other.module
index 74803da..d9ef42d 100644
--- a/cck_select_other.module
+++ b/cck_select_other.module
@@ -235,13 +235,10 @@ function cck_select_other_pre_render($element, $form_state = NULL) {
   $delta = $element['#parents'][2];
 
   if (!$js) {
-    drupal_add_js(array('CCKSelectOther' => array('field' => $field_name, 'lang' => $langcode, 'delta' => $delta)), array('type' => 'setting'));
     drupal_add_js(drupal_get_path('module', 'cck_select_other') . '/cck_select_other.js');
     $js = TRUE;
   }
-  else {
-    drupal_add_js(array('CCKSelectOther' => array('field' => $field_name, 'lang' => $langcode, 'delta' => $delta)), array('type' => 'setting'));
-  }
+  drupal_add_js(array('CCKSelectOther' => array(array('field' => $field_name, 'lang' => $langcode, 'delta' => $delta))), array('type' => 'setting'));
 }
 
 /**
@@ -262,13 +259,10 @@ function cck_select_other_post_render($content, $element) {
   $delta = $element['#parents'][2];
 
   if (!$js) {
-    drupal_add_js(array('CCKSelectOther' => array('field' => $field_name, 'lang' => $langcode, 'delta' => $delta)), array('type' => 'setting'));
     drupal_add_js(drupal_get_path('module', 'cck_select_other') . '/cck_select_other.js');
     $js = TRUE;
   }
-  else {
-    drupal_add_js(array('CCKSelectOther' => array('field' => $field_name, 'lang' => $langcode, 'delta' => $delta)), array('type' => 'setting'));
-  }
+  drupal_add_js(array('CCKSelectOther' => array(array('field' => $field_name, 'lang' => $langcode, 'delta' => $delta))), array('type' => 'setting'));
 
   return $content;
 }
diff --git a/tests/cck_select_other.test b/tests/cck_select_other.test
index c19e1bb..a884191 100644
--- a/tests/cck_select_other.test
+++ b/tests/cck_select_other.test
@@ -308,3 +308,78 @@ class CCKSelectOtherPHPOptionsTest extends CCKSelectOtherTest {
     $this->drupalLogout();
   }
 }
+
+/**
+ * @class
+ * CCK Select Other Multiple Fields Test
+ */
+class CCKSelectOtherMultipleFieldsTest extends CCKSelectOtherTest {
+  public static function getInfo() {
+    return array(
+      'name' => t('CCK Select Other Multiple'),
+      'description' => t('Tests UI when a content type has multiple select other fields.'),
+      'group' => t('Field UI'),
+    );
+  }
+
+  function testMultipleField() {
+    /* Create some options for our select other list */
+    $this->newoptions = '';
+    for ($i = 0; $i < 4; $i++) {
+      $option = $this->randomName(5);
+      $newoptions[$option] = $option;
+      $this->newoptions .= $option;
+      if ($i < 3) {
+        $this->newoptions .= "\n";
+      }
+    }
+
+    do {
+      $firstoption = array_rand(cck_select_other_options($this->test_instance));
+    } while ($firstoption == 'other');
+
+    // Create a new field and instance
+    $this->second_field = $this->test_field;
+    $this->second_field['field_name'] = 'field_' . strtolower($this->randomName(5));
+    $this->second_field['label'] = $this->randomName(5);
+    unset($this->second_field['id']);
+    $this->second_field = field_create_field($this->second_field);
+
+    $this->second_instance = $this->test_instance;
+    $this->second_instance['field_id'] = $this->second_field['id'];
+    $this->second_instance['field_name'] = $this->second_field['field_name'];
+    $this->second_instance['label'] = $this->second_field['label'];
+    $this->second_instance['widget']['settings']['select_list_options'] = $this->newoptions;
+    unset($this->second_instance['id']);
+
+    $this->second_instance = field_create_instance($this->second_instance);
+
+    // Login
+    $this->drupalLogin($this->web_user);
+
+    // Load up our test node in edit view now that we have a new field.
+    $this->drupalGet('node/' . $this->test_node->nid . '/edit');
+    $this->assertRaw($this->second_field['label'], t('Found label, %label, for second test field, %field.', array('%label' => $this->second_field['label'], '%field' => $this->second_field['field_name'])));
+
+    // Post some new values
+    $secondoption = $this->randomName(15);
+    $edit = array(
+      $this->test_instance['field_name'] . '[und][0][select_other_list]' => $firstoption,
+      $this->second_instance['field_name'] . '[und][0][select_other_list]' => 'other',
+      $this->second_instance['field_name'] . '[und][0][select_other_text_input]' => $secondoption,
+    );
+
+    $this->drupalPost('node/' . $this->test_node->nid . '/edit', $edit, t('Save'));
+    $this->assertRaw($firstoption, t('Found option, %option, for field, %field.', array('%option' => $firstoption, '%field' => $this->test_field['field_name']))); 
+    $this->assertRaw($secondoption, t('Found option, %option, for field, %field.', array('%option' => $secondoption, '%field' => $this->second_field['field_name']))); 
+
+    // Check our edit page again.
+    $this->drupalGet('node/' . $this->test_node->nid . '/edit');
+    // @todo there is currently no way in Drupal SimpleTest to test style: hidden.
+    // However, if you use the Debug mode, you can confirm the test yourself.
+
+    // Logout
+    $this->drupalLogout();
+  }
+}
+
