adamwulf / Columnizer-jQuery-Plugin

The Columnizer jQuery Plugin will automatically layout your content in newspaper column format. You can specify either column width or a static number of columns. And, of course, it’s easy to use!
http://welcome.totheinter.net/columnizer-jquery-plugin/
Other
758 stars 147 forks source link

Infinite loop in columnizeIt where destroyable items are empty #197

Open zeffrin opened 9 years ago

zeffrin commented 9 years ago

Ran into issue with infinite loop on the while at line 532.

$destroyable.contents().length gets stuck on 2, and both of those items are empty Then on line 564 goes in here and appends more emptyness to $col.contents(), goes in every time etc

Hacked a fix as so, insert line 585 (end of while loop) if($destroyable.contents().length > 0) { for(int i = $destroyable.contents().length - 1; i >= 0; i--) { if($destroyable.contents(i).length == 0) $destroyable.contents.remove(i); } }

I would submit pull request but I suspect there's going to be a root cause/better place to fix this

Thanks

zeffrin commented 9 years ago

ok that fix isn't right actually, should've been var there but not only that..

I'm having same problem again now except both destroyable.contents() hold 27 non ascii chars