Last active
December 11, 2018 06:47
-
-
Save r4hulp/3aff08e98e767e077e894c8203e29402 to your computer and use it in GitHub Desktop.
JQuery reverse iteration
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
for( i = $('li').size(); i>= 0 ; i--){ | |
$('li').eq(i).someSuperLogicHere; | |
} |
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
$('li').reverse().each( function() { | |
// YOUR SUPER LOGIC HER | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment