Scrollify
Scrollify copied to clipboard
Resize issue
Hello, I've got a problem, when I resize the window, the space between two sections changes. On large resolutions I've got a big space between two blocks, on a narrow I've got a small space, but if i refresh the page the problem disappears. I would really appreciate if you could create a sample of resize function for scrollify.
Currently I'm using that default trigger:
<script> $(function() { $.scrollify({ section : ".example-classname", }); }); </script>
Thanks.
Scrollify has an internal method that recalculates all section heights and positions on resizing. The issues you're having sound like they are unrelated to Scrollify.
Thank you very much. You were right, the issue came out of "box-sizing: border-box" that was applied to the sections.
Well, this can be reproduced on the demo page http://www.giphy.com/gifs/7zGkEzeRP73PftWKMR. After resize is performed, sections are not "attached" to the top of the viewport.
@lukehaas, about:
Scrollify has an internal method that recalculates all section heights and positions on resizing. The issues you're having sound like they are unrelated to Scrollify.
Yes, that's true. BUT these lines of code says that page offset won't be changed (to see the section in the viewport):
https://github.com/lukehaas/Scrollify/blob/4a40e9c53fab4239a28c6e6c00a999adec77f222/jquery.scrollify.js#L545-L548
That is because its passed false for the scroll param.
Thank you!
I confirm what @vasilii-b has reported, this issue has nothing to do with border-box, and it does exists also on the demo page, do you guys have some workaround for it ?
Thanks in advance
Same issue here. Sections are not attached to the top of the viewport when the viewport changes.