Find nth:child element in its parent using jQuery
jQuery API provides a selector ":nth-child" which allows to select particular child element from its parent. For example, if you want to select 2nd li element from the ul tag. See below code. <ul> <li>jQuery</li> <li>By</li> <li>Example</li> </ul> This code will find the 1st li element and makes it forecolor to "Red". For 2nd li […]