I have the following jquery-code:
<script type="text/javascript">
$(document).ready(function() {
$ ('ul.image-list li:even').addClass ('even');
$ ('ul.image-list li:odd').addClass ('odd');
});
</script>
and the following html:
<ul class="image-list">
<li>first element</li>
<li>second element</li>
...
<li>last element</li>
</ul>
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