Skip to content

Instantly share code, notes, and snippets.

@amitabhaghosh197
Created May 20, 2014 13:22
Show Gist options
  • Save amitabhaghosh197/bc800ea0c3e22350442f to your computer and use it in GitHub Desktop.
Save amitabhaghosh197/bc800ea0c3e22350442f to your computer and use it in GitHub Desktop.
children() api jquery
//Works for a children div
$( "div" ).children( ".selected" ).css( "color", "blue" );
//or
$( "ul.level-2" ).children().css( "background-color", "red" );
//more http://api.jquery.com/children/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment