1/*
2For accessing parent element details by using reference of children element.
3Just Take a look on below example:
4*/
5
6<div id="parentDiv">
7 <p>Child paragraph element</p>
8</div>
9
10$(document).ready(function(){
11 alert($("p").parent().attr("id")); // output: parentDiv
12});
13
14/*
15I hope it will help you.
16Namaste
17*/