Last active
August 2, 2016 10:26
-
-
Save jantimon/fdd759c9fe23cf9b27bcd9f01b4e6569 to your computer and use it in GitHub Desktop.
test
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
// Approach 1 | |
$('.demo').each((i,target) => { | |
var $target = $(target); | |
$target.height($target.height() + 10); | |
}); | |
// Approach 2 | |
var heights = $('.demo').map((i,target) => { | |
return $(target).height(); | |
}).get(); | |
$('.demo').each((i, target) => { | |
$(target).height(heights[i] + 10); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://codepen.io/anon/pen/dXqNxP?editors=1111