jquery nearest

101

jquery nearest -

$( "li.item-a" )
  .closest( "ul" )
  .css( "background-color", "red" );

jquery closest -

$( "li.item-a" )
  .closest( "ul" )
  .css( "background-color", "red" );

jquery get closest form -

$( this ).closest( "form" )

Comments

Submit
0 Comments