I have the following HTML
<ul id="listing">
<li>...</li>
<li>...</li>
<li>...</li>
</ul>
How can I access the 2nd LI
inner text?
Can I do
$("#listing li").[1].text()
If not, what is the sytax?
I have the following HTML
<ul id="listing">
<li>...</li>
<li>...</li>
<li>...</li>
</ul>
How can I access the 2nd LI
inner text?
Can I do
$("#listing li").[1].text()
If not, what is the sytax?
$("#listing li:eq(1)").text();
More about the Index Selector at http://docs.jquery.com/Selectors/eq#index