title: Assigning ODD/EVEN Class to span with Jquery/javascript
body: <p>i just stuck up with assigning ODD/EVEN Class to span with Jquery.</p>
  
  <p><strong>QUESTION UPDATED</strong></p>
  
  <p>I need to add class to span inside col div as <strong>"odd"/"even"</strong> . check the commented class name  and order of execution &amp; i need to assign in this way.</p>
  
  <p><strong>Expected Output: Class name are in comments</strong></p>
  
  <pre><code>&lt;section&gt;
  
      &lt;div class="col"&gt;
          &lt;span&gt;&lt;/span&gt; &lt;!-- ODD --&gt; (1)
          &lt;span&gt;&lt;/span&gt; &lt;!-- ODD --&gt; (5)
          &lt;span&gt;&lt;/span&gt; &lt;!-- EVEN--&gt; (8)
          &lt;span&gt;&lt;/span&gt; &lt;!-- ODD--&gt; (10)
          &lt;span&gt;&lt;/span&gt;&lt;!-- EVEN--&gt; (11)
      &lt;/div&gt;
  
      &lt;div class="col"&gt;
          &lt;span&gt;&lt;/span&gt;&lt;!-- EVEN--&gt; (2)
          &lt;span&gt;&lt;/span&gt;&lt;!-- ODD--&gt;  (6)
          &lt;span&gt;&lt;/span&gt;&lt;!-- EVEN--&gt; (9)
      &lt;/div&gt;
  
      &lt;div class="col"&gt;
          &lt;span&gt;&lt;/span&gt;&lt;!-- ODD --&gt; (3)
  
      &lt;/div&gt;
      &lt;div class="col"&gt;
          &lt;span&gt;&lt;/span&gt;&lt;!-- EVEN--&gt; (4)
          &lt;span&gt;&lt;/span&gt;&lt;!-- ODD--&gt;  (7)
      &lt;/div&gt;
  
  &lt;/section&gt;
  </code></pre>