Try Demo Examples
Get first child by tag name in jquery ( 3 ways explained)
$("#someId").children().first('div').attr('id');
$("#someId").find('div:first').attr('id')
$("#someId").children('div:first').attr('id')
Get first child by id in jquery ( 2 ways explained)
$("#someId").children("#idToFind:first");
$("#someId").find("#idToFind:first");
Get first child by class name in jquery
$("someId").find(".someClass:first");
Get all child by tag name in jquery
$("#someDivId").find("#myTable tr")
Get all first td's of every row in table in jquery
$("#myTable tr td:first-child")
Try Demo Examples
Also Check below links
How to select parent element in jQuery
great
ReplyDelete