[jQuery] li:gt(...) keeps counting to the next list
Using two ul lists:
<ul>
<li>alpha</li>
<li>beta</li>
</ul>
<ul>
<li>gamma</li>
<li>delta</li>
</ul>
In jQuery, I am trying to select all li's *except* the first one:
$("ul li:gt(0)").hide();
and then on hover, reveal them:
$("ul:first-child").hover(
function() {
$("#preferences ul li:gt(0)").show();
},
function() {
$("#preferences ul li:gt(0)").hide();
}
);
The problem is, that the selector "ul li:gt(0)", goes on and hides the
second list ('gamma', 'delta').
As those are two individual lists, I thought that 'gamma' was
index[0], and not part of the first list, ie index[2].
Am I wrong? Is there another way to do this?