title: Using class selector for autocomplete, need to get associated element id
body: <p>I have implemented Dylan Verheul's Autocomplete 1.6 JQuery plugin on a web page.  I am using the autocomplete on 20+ different input boxes on the page.  A class name is being used as the selector.  The autocomplete works fine on each of the different input elements, though I am having trouble getting the ID of the current input element we are on.  </p>
  
  <p>Basically the HTML is this:</p>
  
  <pre><code>&lt;form name="myform" action="blah.asp" method="post"&gt;
    &lt;input class="ItemMatchText" type="text" id="selectQuestion_104657" name="selectQuestion_104657" value=""&gt;
    &lt;input class="ItemMatchText" type="text" id="selectQuestion_104664" name="selectQuestion_104664" value=""&gt;
    &lt;input class="ItemMatchText" type="text" id="selectQuestion_104710" name="selectQuestion_104710" value=""&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The JavaScript is basically like this:</p>
  
  <pre><code>$(function() { 
    var selectedId = "";
    $('.ItemMatchText').autocompleteArray(ItemArray, {
      autoFill:true,
      matchContains:true,
      onItemSelect: function(data1) {
        selectedId = data1.extra[0];
        }
    });
  
  //...
  });
  </code></pre>
  
  <p>The line: selectedId = data1.extra[0]; gets the next column in the array for the selected row.  In this same event, or any other for that matter, I would like to get the element Id that is currently being typed in to evoke this autoselect.  </p>
  
  <p>Everything I have tried either returns the LI element or the first INPUT element on the page with the class, ItemMatchText.</p>
  
  <p>How do I get the input's ID?</p>