Skip to content

Commit 6b562cc

Browse files
committed
fixed issue 36, where dontend might mess up with text nodes at the end of a column
1 parent fe927c5 commit 6b562cc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/jquery.columnizer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@
242242
split($col, $destroyable, $col, targetHeight);
243243
}
244244

245-
while(checkDontEndColumn($col.children(":last").length && $col.children(":last").get(0))){
246-
var $lastKid = $col.children(":last");
245+
while(checkDontEndColumn($col.contents(":last").length && $col.contents(":last").get(0))){
246+
var $lastKid = $col.contents(":last");
247247
$lastKid.remove();
248248
$destroyable.prepend($lastKid);
249249
}
@@ -352,8 +352,8 @@
352352
// alert("not splitting a dontend");
353353
}
354354

355-
while(checkDontEndColumn($col.children(":last").length && $col.children(":last").get(0))){
356-
var $lastKid = $col.children(":last");
355+
while(checkDontEndColumn($col.contents(":last").length && $col.contents(":last").get(0))){
356+
var $lastKid = $col.contents(":last");
357357
$lastKid.remove();
358358
$destroyable.prepend($lastKid);
359359
}

0 commit comments

Comments
 (0)