how to add class in 4th li using jquery -


I'm enjoying Jquery , but I only have basic knowledge How to use jquery in <4> code in its 4 li .

& lt; Ul id = "item" & gt; & Lt; Li & gt; Sample & lt; / Li & gt; & Lt; Li & gt; Sample & lt; / Li & gt; & Lt; Li & gt; Sample & lt; / Li & gt; & Lt; Li & gt; Sample & lt; / Li & gt; & Lt; Li & gt; Sample & lt; / Li & gt; & Lt; Li & gt; Sample & lt; / Li & gt; & Lt; / Ul & gt;

Thank you in advance ... Hope this makes sense.

$ (" #team "). Eq (3) .addClass ("your-class"); More info:

Demo:


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -