Created
July 29, 2015 14:12
-
-
Save yajamon/169d9b216ac715b8e8f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$( "div" ).each(function( index, element ) { | |
// element == this | |
$( element ).css( "backgroundColor", "yellow" ); | |
if ( $( this ).is( "#stop" ) ) { | |
$( "span" ).text( "Stopped at div index #" + index ); | |
return false; // break each. | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment