title: jQuery MultiSelect Plugin SumoSelect not binding to multiple instances on single page
body: <p>I am looping through an object, and for each instance in the loop I want to provide a multi-select dropdown (using jQuery plugin <a href="https://hemantnegi.github.io/jquery.sumoselect/" rel="nofollow noreferrer">SumoSelect</a>). However, right now, SumoSelect only seems to bind to the first multiselect dropdown in the loop, and not any dropdowns afterward. How can each dropdown in the loop have the SumoSelect effects? (there is an open issue on this on Github)</p>
  
  <p>Looking at the console, I see that the first dropdown has attached: <code>div class="SumoSelect" tabindex="0"&gt;</code>, but this does not apply to the other examples.</p>
  
  <p>I have tried a few different options and looked at the source code (and googled a bunch), but am unclear on what I need to do differently.</p>
  
  <p>Here is a simplified example. Let's say I have a class "post" that can have many "authors". On the page where I show the "posts", I want to loop through the posts, and for each post, give the user a multiselect dropdown from which to choose authors to add to the post. Right now, the author dropdown for the first post from the loop has the correct SumoSelect effects, but there is no SumoSelect on any posts after that:</p>
  
  <p>posts/view.html.erb (this dropdown creates a join table entry for posts and authors--the controller code to do this works fine, problem is just binding of SumoSelect after first dropdown in loop):</p>
  
  <pre><code>&lt;% @posts.each do |post| %&gt;
  ....
  &lt;select id="author-choice" name="author_ids[]"  multiple="true"&gt;
    &lt;% Author.all.each do |author| %&gt;
       &lt;option value="&lt;%= author.id%&gt;",&lt;%= author.name %&gt;&lt;/option&gt;
    &lt;% end %&gt;
  &lt;/select&gt; ...
  </code></pre>
  
  <p>In my javascript, I have: </p>
  
  <pre><code>$(document).ready(function (){ 
    $('#author-choice').SumoSelect();
  });
  </code></pre>