Select Syntax

Select Syntax

I always have a terrible time getting jquery syntax correct.

I have a structure like this:

<div class="tmenu">
<ul>
<li>Line One</li>
<li>Line two</li>
</ul>
</div>

I'm trying to select the second line like this:

$j('.tmenu li:eq(2)').dosomething();

But since it's not working, I have obviously done something wrong.

I can select the second line by assigning it to a class. But i don't understand why the syntax above doesn't work.