Created
March 8, 2013 12:54
-
-
Save bennybennet/5116307 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
// !--- Caching | |
$(selector).each(function( index ) { | |
var $el = $(this); | |
// 2-3 DOM-Manipulationen an dem Element | |
// mit Benutzung von $el, z.B. $el.width() | |
}); | |
// !--- kein Caching | |
$(selector).each(function( index ) { | |
// 2-3 DOM-Manipulationen an dem Element | |
// mit Benutzung von $(this), z.B. $(this).width() | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment