$("p.menu").closest("div"); //selects the closest <div> ancestor for <p> //elements that have class="menu"
.closest(selector,[context] or object or element) method returns a jQuery object representing the first element that matches the argument that is passed in. The argument can be a
context of where to begin searching, a jQuery
object, or a DOM object. The search begins at the current set of elements and then searches ancestors.