jquery get near by tag code example
Example 1: jquery closest
$( "li.item-a" )
.closest( "ul" )
.css( "background-color", "red" );
Example 2: jquery get element by tag
$( "div" ).css( "border", "9px solid red" );
$( "li.item-a" )
.closest( "ul" )
.css( "background-color", "red" );
$( "div" ).css( "border", "9px solid red" );