Selecting a specific Child of the parent element

Posted by Vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 779
To select a specific child of the parent element,nth child selector can be used.

<script language = "javascript" type = "text/javascript">
$("#div_project p:nth-child(5)").css("background", "green");

Note:- Above jQuery code will select the 5th paragraph(p) element that is inside the div_project element.

Comments or Responses

Login to post response