title: How to make a jQuery plugin work on multiple elements at the same time?
body: <p>I've made a combobox-plugin. To use it, you just have to call </p>
  
  <pre><code>$(elem).combobox(compensateElement);
  </code></pre>
  
  <p>EDIT:
  Problem is that if you do</p>
  
  <pre><code>$('#1').combobox('form');
  $('#2').combobox('form');
  </code></pre>
  
  <p>the plugin will break...</p>
  
  <p>The elem is the select to be turned into a combobox, and the compensateElement is an element after which the plugin can insert a div that is the length of the suggestionsDiv-20px high. (I have a footer on my page that isn't pushed down by absolute positioned elements...)</p>
  
  <p>Now, the problem is that this plugin can ONLY BE USED ON ONE ELEMENT! How can it be changed so it can work on multiple elements at once? It's more than a hundred lines of JS-code, so I do not expect the "converted" code!</p>
  
  <p>I've thought of putting all element-specific variables into the this.data "object", but it didn't feel at all like a good solution. After running some RegEx find&amp;replace on it and configuring it for a couple of hours, I didn't get it to work at all...</p>
  
  <p>What techniques can I use?</p>
  
  <p>Thank you very much for your time!</p>