how to get all nearest element in jquery based on input from table code example
Example: jquery closest
$( "li.item-a" )
.closest( "ul" )
.css( "background-color", "red" );
$( "li.item-a" )
.closest( "ul" )
.css( "background-color", "red" );