title: How to find out which text field has been used in jquery function
body: <p>I have the following form :</p>
  
  <pre><code>&lt;input name="linkColor" type="text" id="colorpickerField0" &gt;
  &lt;input name="linkColor" type="text" id="colorpickerField1" &gt;
  &lt;input name="linkColor" type="text" id="colorpickerField2" &gt;
  </code></pre>
  
  <p>In my function below, how may I find out which text field has been invoked. For example, I want to set conditions in the onSubmit function where if #colorpickerField0 then do blah blah, and if #colorpickerField1 THEN do blah blah blah etc etc. Any help will be greatly appreciated. Thanks</p>
  
  <pre><code>$('#colorpickerField0, #colorpickerField1, #colorpickerField2').ColorPicker({
      onSubmit: function(hsb, hex, rgb, el) {
          alert($(this));
          // do this if #Field0
          // statements
          // do this if #Field1
          // statements
          // do this if #Field2
          // statemets
  
          $(el).val(hex);
          $(el).ColorPickerHide();
      },
      onBeforeShow: function () {
          $(this).ColorPickerSetColor(this.value);
      }
  })
  .bind('keyup', function(){
      $(this).ColorPickerSetColor(this.value);
  });
  </code></pre>
  
  <p>I'm using <a href="http://www.eyecon.ro/colorpicker/" rel="nofollow">http://www.eyecon.ro/colorpicker/</a></p>
  
  <p>If I do alert($(this).attr('id')); I get undefined, so I still can't tell which one was used.</p>