Basic jQuery issue
Basic jQuery issue
Hello, I am just learning jQuery and am using this code as a test.
-
<script type="text/javascript" src="jquery-1.2.6.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#images li:even").show("slow");
$("#images a").click(function() {
$(this).next().show("slow");
});
});
</script>
-
<ul id="images">
<li style="display: none;"><a href="#">Test1</a></li>
<li style="display: none;"><a href="#">Content1</a></li>
<li style="display: none;"><a href="#">Test2</a></li>
<li style="display: none;"><a href="#">Content2</a></li>
<li style="display: none;"><a href="#">Test3</a></li>
<li style="display: none;"><a href="#">Content3</a></li>
</ul>
It displays the even rows fine, but then when I click one of them nothing else shows up. I want it to display the <li> that comes after the one that contains the <a> that was clicked.
Thanks!
-Chris Hayes