Answers for "jquery select a specific child"

1

jquery specific child by index

<div class="second">
    <div class="selector" id="selFirst">Number One</div>
    <div class="selector" id="selSecond">Number Two</div>
    <div></div>
</div> 
<script>
	var index = 0
 	console.log($('.second').children().eq(index).text());
 	//Number One
</script>
Posted by: Guest on November-17-2020
0

jquery select element inside element

$("#moo") > $("#foo #moo") > $("div#foo span#moo") > $("#foo span") > $("#foo > #moo")
Posted by: Guest on November-18-2020

Code answers related to "jquery select a specific child"

Browse Popular Code Answers by Language