Skip to content

Commit 8056f53

Browse files
committed
Merge pull request adamwulf#115 from borkweb/infinite-loop-jquery-1.10
Fixes infinite loop bug with jQuery v1.10 & v2.0.2
2 parents 478350c + c928d0e commit 8056f53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/jquery.columnizer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,9 @@
522522
}else if(!scrollHorizontally){
523523
// the last column in the series
524524
$col = $inBox.children().eq($inBox.children().length-1);
525-
while($destroyable.contents().length) $col.append($destroyable.contents(":first"));
525+
$destroyable.contents().each( function() {
526+
$col.append( $(this) );
527+
});
526528
var afterH = $col.height();
527529
var diff = afterH - targetHeight;
528530
var totalH = 0;

0 commit comments

Comments
 (0)