title: Apply a random class to every element specified
body: <p>I am trying to add a random class to even &lt; li > element within my #container div</p>
  
  <p>Here is my code: </p>
  
  <pre><code>$( "#container li" ).each(  
  
    $().ready(function() {
  
          $("#container li:random").addClass("one");
          $("#container li:random").addClass("two");
          $("#container li:random").addClass("three");
  
      })
      );
  </code></pre>
  
  <p>The problem is that I have ten &lt; li > elements and I want each of these elements to receive one of the three possible classes in a random fashion.</p>
  
  <p>However my code above only assignes three &lt; li > elements with the classes leaving the remaining seven &lt; li > elements class-less.</p>
  
  <p>I have tried other snippets of code but none of which randomly apply a list of classes to ALL elements specified. </p>
  
  <p>I have tried snippets from this post <a href="https://stackoverflow.com/questions/1911855/adding-randomly-chosen-class-to-html-tag-using-jquery">HERE</a> but none of which produce the desired result of making sure all elements get a random class.</p>
  
  <p>Thank you for your help.</p>