jquery get first child code example
Example 1: firstElementChild jquery equivalent
$('#myList > li:first-child');
// or
$('#myList').children('li:first-child');
// or
$('#myList > li').first();
// or
$('#myList').children().first();
// and so on
Example 2: jquery first child
$('div:first-child')
Example 3: jquery first child
$( "li" ).first().css( "background-color", "red" );
Example 4: select the first elemnt have class in jquery
<script>
// jquery
$( "tr:first" ).css( "font-style", "bold" );
</script>