lukehaas / Scrollify

A jQuery plugin that assists scrolling and snaps to sections.
MIT License
1.81k stars 577 forks source link

Maximum call stacksize exceeded when call $.scrollify.move() in afterRender #354

Closed phucbm closed 3 years ago

phucbm commented 5 years ago

I just have a small question. How to add move() method inside afterRender option?

If I set like this console is giving me an error about maximum call stacksize exceeded.

jQuery.scrollify({
        section : ".section_scrollyfy",
        afterRender:function() {
jQuery.scrollify.move(1);
}
});

Originally posted by @Shashank-Bhatt1 in https://github.com/lukehaas/Scrollify/issues/274#issuecomment-439874130

Shashank-Bhatt1 commented 5 years ago

Yes, i also have this problem.

elvisgraho commented 5 years ago

I figured it out.

Scrollify Source code needs to be this: if(firstLoad===true) { firstLoad = false; settings.afterRender(); }

Instead of this: if(firstLoad===true) { settings.afterRender(); firstLoad = false; }

lukehaas commented 5 years ago

@elvitos-peterson raise a PR please. I'll get it merged in.