Skip to content

Instantly share code, notes, and snippets.

@jantimon
Last active August 2, 2016 10:26
Show Gist options
  • Save jantimon/fdd759c9fe23cf9b27bcd9f01b4e6569 to your computer and use it in GitHub Desktop.
Save jantimon/fdd759c9fe23cf9b27bcd9f01b4e6569 to your computer and use it in GitHub Desktop.
test
// 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);
});
@jantimon
Copy link
Author

jantimon commented Aug 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment