Skip to main content

.parent()

Variations

.parent(): DoMini

Gets the direct parent elements (Dominified) for the selected elements

console.log( 'Parent: ', $( "div" ).parent() );

.parent(String selector): DoMini

Gets the direct parent elements (Dominified) matching the selector for the selected elements

console.log( 'Parents matching ".parent-class": ', $( "div" ).parent('.parent-class') );