How to get child id of an element (div) using jQuery?

Using children() method we can retrieve id of element a single level down the DOM tree.

Example:

$(“.divTableCell”).click(function() {
var child_id= $(this).children.attr(“id”);
});

Be the first to comment

Leave a Reply

Your email address will not be published.


*