title: get the class name by another class name jQuery
body: <p>I have a div  having many classes , let suppose</p>
  
  <pre><code>&lt;div class="myDiv one two three"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Now I want to get the class names using the class "myDiv", here are some cases , in some cases I need the class name which is on third position i.e "two", In some times I need class on position second which is "one", can any one have idea to get my desired classes.
  My jQuery code is</p>
  
  <pre><code>alert($('.myDiv').attr('class'));
  </code></pre>
  
  <p>But this alert all the classes.</p>