From c928d0eb533969c16a50ab8c4c70ce6aefd5e074 Mon Sep 17 00:00:00 2001 From: Matthew Batchelder Date: Thu, 30 May 2013 13:01:24 -0400 Subject: [PATCH] Fixes infinite loop bug with jQuery v1.10 --- src/jquery.columnizer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/jquery.columnizer.js b/src/jquery.columnizer.js index 6099c4a..75fd202 100644 --- a/src/jquery.columnizer.js +++ b/src/jquery.columnizer.js @@ -522,7 +522,9 @@ }else if(!scrollHorizontally){ // the last column in the series $col = $inBox.children().eq($inBox.children().length-1); - while($destroyable.contents().length) $col.append($destroyable.contents(":first")); + $destroyable.contents().each( function() { + $col.append( $(this) ); + }); var afterH = $col.height(); var diff = afterH - targetHeight; var totalH = 0;