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

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”);
});