Problem with each()
<pre><code>&lt;script type="text/javascript"&gt;
    //&lt;!--
$(document).ready(function() {

 $('ul.course-nav li a').each(function() {
  alert(5);
  if ('#' == $(this).attr('href')) {
   $(this).addClass('lessOpacity');
  }
 });

});    //--&gt;
&lt;/script&gt;
</code></pre>

<p>HTML of course contains searched elements:</p>

<pre><code>  &lt;ul class="course-nav"&gt;
   &lt;li&gt;&lt;a href="navigator.php?kam=zakladnyNahladKurzu&amp;amp;id=1&amp;amp;pos=2" class="next"&gt;&lt;img src="css/images/16_arrow_right.png" alt="next"&gt;&lt;/a&gt;&lt;/li&gt;

   &lt;li&gt;&lt;a href="#" class="prev"&gt;&lt;img src="css/images/16_arrow_left.png" alt="prev"&gt;&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a href="navigator.php?kam=zakladnyNahladKurzu&amp;amp;id=1" class="start"&gt;&lt;img src="css/images/16_arrow_first.png" alt="start"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
</code></pre>

<p>Yet it doesn't work. Not even alerts pop up. Any suggestions?</p>
