Using parent() method we can retrieve the id of an element single level up the DOM tree.
Example:
$(“.divTableCell”).click(function() {
var parent_id = $(this).parent().attr(“id”);
});
Using parent() method we can retrieve the id of an element single level up the DOM tree.
Example:
$(“.divTableCell”).click(function() {
var parent_id = $(this).parent().attr(“id”);
});