title: Jquery HTML5 select dropdown restyling conflict. Need multiple select dropdowns on same page
body: <p>Greetings,</p>
  
  <p>I am restyling the select element with HTML5 and jQuery. I can successfully create one dropdown with a .js file dedicated to the element, but I need help on populating the page with multiple instances of this element.</p>
  
  <p>The select element can be summarized as this:</p>
  
  <pre><code>&lt;form&gt;
  &lt;select name="fancySelect" class="makeMeFancy"&gt;
  &lt;option value="0" selected="selected" data-skip="1"&gt;Choose Your Location&lt;/option&gt;
  &lt;option value="1" data-html-text="United States"&gt;United States&lt;/option&gt;
  &lt;/select&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The js is more complex and seeks to hide the select element and replace it.
  Briefly:</p>
  
  <pre><code>var select = $('select.makeMeFancy');
  var selectBoxContainer = $('&lt;div&gt;',{
      width       : select.outerWidth(),
      className   : 'tzSelect',
      html        : '&lt;div class="selectBox"&gt;&lt;/div&gt;'
  });
  
  var dropDown = $('&lt;ul&gt;',{className:'dropDown'});
  var selectBox = selectBoxContainer.find('.selectBox');
  </code></pre>
  
  <p>It then creates css styles for this element further down the script.</p>
  
  <p>My question is how do I maintain this one javascript document for multiple select elements. Is it possible with one main variable and multiple select classnames i.e.</p>
  
  <pre><code>var select =$('select.makeMeFancy');
  var selectBoxContainer = $('&lt;div&gt;',{
  width   : select.outerWidth(),
  className   : 'tzSelect','tzSelectb','tzSelectc'
  html        : '&lt;div class="selectBox"&gt;&lt;/div&gt;'
  </code></pre>
  
  <p>HTML example is available at: <a href="http://nutnics.com/som/selectx.html" rel="nofollow">select restyling example</a> updated: <strong>SOLVED</strong></p>
  
  <p>I have 3 elements inline, and as you can see it pulls the code into the very last select element and groups them altogether.</p>
  
  <p>Sorry for the sloppy description, I think this should be everything.</p>
  
  <p>The original dropdown was created by Turtorial Zine over at <a href="http://tutorialzine.com/2010/11/better-select-jquery-css3/" rel="nofollow">TutorialZine "Making better select elements"</a></p>