
Untitled
By: a guest on
Aug 1st, 2012 | syntax:
None | size: 0.58 KB | hits: 7 | expires: Never
simple loop in coffeescript
count = $content.find('.post').length;
for x in [1...count]
/*
prev_el_height += $("#content .post:nth-child(" + x + ")").height();
*/
prev_el_height += $content.find(".post:nth-child(" + x + ")").height();
for (x = 1; x < count; x++) { prev_el ... }
for (x = 1; 1 <= count ? x < count : x > count; 1 <= count ? x++ : x--) {
for x in [1...count] by 1
...
for (x = 1; x < count; x++) { /* ... */ }
for (x = 1; x > count; x--) { /* ... */ }
$('#content .post').each ->
prev_el_height += $(this).height()