title: Jquery: Adding a class to even an odd List-Elements
body: <p>I have the following jquery-code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function() {
          $ ('ul.image-list li:even').addClass ('even');
          $ ('ul.image-list li:odd').addClass ('odd');
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>and the following html:</p>
  
  <pre><code>&lt;ul class="image-list"&gt;
  &lt;li&gt;first element&lt;/li&gt;
  &lt;li&gt;second element&lt;/li&gt;
  ...
  &lt;li&gt;last element&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>However the jquery does not seem to be applied, because the li-tags don't get the proper classes (even or odd). What am I doing wrong? thanks</p>