-
-
Save elijahmanor/4646532 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// The previous code could be rewritten as the following | |
$( ".widget" ).css( "color", "green" ); |
This file contains hidden or 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
// Indications of Confusion | |
$( ".widget" ).each( function() { | |
$( this ).css( "color", "green" ); | |
}); |
This file contains hidden or 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
// Explicit Loops | |
$( ".widget" ).each( function( index, element ) { | |
$( element ).append( index ); | |
}); |
This file contains hidden or 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
// Implicit Loops | |
$( ".widget" ).addClass( "highlight" ); |
This file contains hidden or 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
// The previous code could be rewritten as the following | |
$( ".widget" ).css({ | |
"color": "green", | |
"font-size": "16px" | |
}); |
This file contains hidden or 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
// Performance Implications | |
$( ".widget" ).css( "color", "green" ).css( "font-size", "16px" ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment