jquery - find position of <li> -


i trying find position of test3 in jquery can lead me down right path please.

i need jquery display 5

<ul id="numeric" class="sortable boxier" style="margin-right: 1em;"> <li>test7</li> <li>test2</li> <li>test6</li> <li>test5</li> <li>test3</li> <li>test8</li> </ul> 

thank you

$('li:contains(test3)').index() 

note uses 0-based indexing, display 4. can add 1 if want start count @ 1.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -