Columnizer-jQuery-Plugin icon indicating copy to clipboard operation
Columnizer-jQuery-Plugin copied to clipboard

duplicating content on resize

Open opanitch opened this issue 12 years ago • 2 comments

Hey I've been using your pagination example to create a multi-page article layout which is supposed to redistribute content on window resize (height AND width). It works on first load, but when the window is resized, the columnizer creates more pages and duplicates, seemingly at random, the content from the first initialization. I created a jsfiddle here to show you: http://jsfiddle.net/opanitch/YY9x3/

Everything is working properly except for the duplicating content/pages. Any help would be appreciated thanks!

opanitch avatar Feb 13 '13 20:02 opanitch

Hi,

I had a similar issue, it was because I was calling the columnize function more than once (and not just a single time on document load). It seems from your code that buildNewsletter(); is performed every time the columnizer finishers; this in turn calls columnize again. Hope this makes sense?

Conor

conorw avatar Feb 14 '13 16:02 conorw

yes, I see what you're saying. But if columnize isn't called again, the new overflow from the newly resized first page won't redistribute properly.

The reason it gets called again within the first call is to columnize the overflow of each page that is created onLoad. But why would trying to columnize something again create duplicate content? The targeted DIV doesn't even have content in it at that point anymore...

opanitch avatar Feb 14 '13 20:02 opanitch