Selecting Elements | jQuery Learning Center

PHOTO EMBED

Sat May 29 2021 01:03:38 GMT+0000 (UTC)

Saved by @ejiwen

// Refining selections.
$( "div.foo" ).has( "p" );         // div.foo elements that contain <p> tags
$( "h1" ).not( ".bar" );           // h1 elements that don't have a class of bar
$( "ul li" ).filter( ".current" ); // unordered list items with class of current
$( "ul li" ).first();              // just the first unordered list item
$( "ul li" ).eq( 5 );              // the sixth
content_copyCOPY

Refining & Filtering Selections.

https://learn.jquery.com/using-jquery-core/selecting-elements/