jquery-scrollify

Scrollify - get last viewed section

半世苍凉 提交于 2019-12-11 15:15:53
问题 Is there any way to get last viewed section index/id/class when moving to next or previous section using scrollify.js? Am looking for any predefined function like scrollify.current() for getting last viewed section. Thanks in advance 回答1: Not able to find any predefined class, so wrote my own function. var prevIndex = 0; $.scrollify({ before:function(index, sections) { var prevSection = '#' + getScrollifySectionID(prevIndex) prevIndex = index; //Do your code with PrevSection(ID). } });

scrollify - scroll normally after last section?

别说谁变了你拦得住时间么 提交于 2019-12-08 02:52:00
问题 Is it possible with the scrollify plugin to scroll normally after last section? For example I have 6 sections and then a footer, I want scrolling after the last section to be normal. Right now, because footer isn't a section, I can't even scroll to it. 回答1: I disable scrollify when viewport is below of last slide and enable it in otherwise: $(document).on('scroll', function(e){ var top = $('.slider .slide:last').offset().top; var screenTop = $(document).scrollTop(); if (top > screenTop && $

Scrollify section scroll with overflow

☆樱花仙子☆ 提交于 2019-12-06 08:27:13
问题 I am trying to use the script Scrollify (https://github.com/lukehaas/Scrollify) but I have sections that are longer than the user's screen, which means you first have to scroll down to see that contents' content. Scrollify, however, doesn't let this happen and will just immediately scroll to the new section. Is there a way to modify Scrollify and/or use another script that will accomplice what I would like it to do? 回答1: Scrollify has recently received a number of updates that resolve the

scrollify - scroll normally after last section?

瘦欲@ 提交于 2019-12-06 07:30:22
Is it possible with the scrollify plugin to scroll normally after last section? For example I have 6 sections and then a footer, I want scrolling after the last section to be normal. Right now, because footer isn't a section, I can't even scroll to it. I disable scrollify when viewport is below of last slide and enable it in otherwise: $(document).on('scroll', function(e){ var top = $('.slider .slide:last').offset().top; var screenTop = $(document).scrollTop(); if (top > screenTop && $.scrollify.isDisabled()) { $.scrollify.enable(); $.scrollify.update(); } else if (top < screenTop && !$