When such event is fired in vp mode, smartscroll will find it's most prominent section (one which occupies most of the screen), and smoothly scroll to the section above or below it. The mousewheel and DOMMouseScroll (for Firefox) events are bound. The scrollStart and scrollEnd listener will receive the slide number as its only argument the first slide will have a number of 1, the section before the sectionWrapper will have a number of 0.Ĭurrently, there are two features of smartscroll, and this is how it's implemented: If present, smartscroll can provide six events scrollStart, scrollEnd, swipeLeft, swipeRight, swipeDown and swipeUp. Smartscroll has a soft dependency on EventEmitter. bindKeyboard - (Boolean) Allow for keyboard events (up and down arrows) to control slides.bindSwipe - (Boolean) Allow for listening of swipe events.ie8 - If you need to support Internet Explorer 8, change this to true.You can also listen to the scroll events this way. eventEmitter - (Object) If you pass in an EventEmitter object, autoHashing will be much more efficient.Set to false otherwise to increase performance. dynamicHeight - (Boolean) If you are going to be dynamically adding and removing content so as to change the position and/or size of the section wrappers and/or sections, then set this to true.sectionSelector - (String) The selector applied to each section, overrides sectionClass and allow more flexibility in choosing a selector.breakpoint - (Integer) The width of the browser below which scrolljacking will be disabled.headerHash - (String) The hash for the section above the sections, must be non-empty to reliably ensure the page do not jump when updating the hash value across browsers (as # means _top).animationSpeed - (Integer) Time taken for the scroll animation, in miliseconds.sectionClass - (String) The class name applied to each section.sectionWrapperSelector - (String) The CSS selector for the block element which wraps around your sections.keepHistory - (Boolean) Whether scrolling through different sections will be recorded in the browser's history.initialScroll - (Boolean) Whether smartscroll should scroll to the position specified by the hash on initial load. ![]() sectionScroll - (Boolean) Whether the section-scrolling feature is enabled.If you use this feature, it is important to use EventEmitter as well, otherwise smartscroll will listen to every scroll event, which is very resource-draining and can make the animation more 'glitchy' autoHash - (Boolean) Whether the auto-hashing feature is enabled. ![]() set - Use the height and width set by CSS (use this for having different heights for different sections). ![]()
0 Comments
Leave a Reply. |