title: javascript index() of form inputs and selects
body: <p>I have a series of inputs and selects mixed together in an html form:</p>
  
  <pre><code>&lt;th&gt;&lt;input type="text" id="bGroup" name="search_group"   /&gt;&lt;/th&gt;
  &lt;th&gt;&lt;input type="text" id="bEvent" name="search_event"   /&gt;&lt;/th&gt;
  &lt;th&gt;&lt;input type="text" id="bBenefactor" name="search_benefactor"   /&gt;&lt;/th&gt;
  &lt;th&gt;&lt;select name="search_status" id="bStatus"&gt;      
          &lt;option value=""&gt;&lt;/option&gt;      
          &lt;option value="RS"&gt;RS&lt;/option&gt;                  
          &lt;option value="CAN"&gt;Cancelled&lt;/option&gt;                  
          &lt;option value="ICR"&gt;ICR&lt;/option&gt;                    
          &lt;option value="HLD"&gt;Holding&lt;/option&gt;            
          &lt;option value="DEN"&gt;Denied&lt;/option&gt;                 
      &lt;/select&gt;
   &lt;/th&gt;
  &lt;th&gt;&lt;input type="text" id="bGiving" name="search_giving"   /&gt;&lt;/th&gt;
  </code></pre>
  
  <p>I am trying to use a JQuery function to call the index of the form element.
  This works fine if I'm only using form inputs and not selects like so:</p>
  
  <pre><code>$("tfoot input").keyup( function () {
          /* Filter on the column (the index) of this element */  
          oTable.fnFilter( this.value, $("tfoot input").index(this) );
      } );
  </code></pre>
  
  <p>If i want to use both form input elements, I have to manually assign indexes like this: </p>
  
  <pre><code>$("tfoot input#bGroup").keyup( function () {
          /* Filter on the column (the index) of this element */  
          //alert($("tfoot input").index(this));
          oTable.fnFilter( this.value, 1 );
      } );
  ... 
  $("tfoot select#bStatus").on('change',  function () {
          /* Filter on the column (the index) of this element */  
          //  alert($("tfoot select").parent().index(this));
          oTable.fnFilter( this.value, 4 );
      } );
  </code></pre>
  
  <p>Which is not to my advantage. </p>
  
  <p>What I would like to do is have both form elements index together so I do not have to manually assign rows/write a bunch of functions.
  I tried using a fieldset but I didn't have much luck.</p>
  
  <pre><code>$("tfoot fieldset").on('keyup change', function () {
          /* Filter on the column (the index) of this element */  
          oTable.fnFilter( this.value, $("tfoot fieldset").index(this) );
      } );
  </code></pre>
  
  <p>Any help is Appreciated.</p>