amondit / jquery.scrollsteps.js Goto Github PK
View Code? Open in Web Editor NEWjQuery plugin to handle mouse scrolling by steps, handling many mousewheel types (click, inertia, etc.)
License: MIT License
jQuery plugin to handle mouse scrolling by steps, handling many mousewheel types (click, inertia, etc.)
License: MIT License
default transitionDuration of 2000 is too slow for me, so i changed it to 350ms and this doesent work on magic mouse, snaps fast between the sections
It would be nice to have a scrollThreshold
setting.
Currently if you scroll 1 pixel, it starts the scroll. It would be nice to be able to add a threshold, like 20px to give it a little less "twitch",
I'm trying to integrate this plugin with the plugin - jquery cycle2. (http://jquery.malsup.com/cycle2/)
I used the file jquery.scrollsteps-full-min.js. ( https://github.com/amondit/jquery.scrollsteps.js/blob/gh-pages/jquery.scrollsteps-full-min.js ).
That's how I call the plugin:
$(function() {
var $slider = $('.slider_overlay');
// slider initialize
$slider.cycle({
fx: 'scrollVert',
timeout: 0,
pager: '.slider_list',
pagerTemplate: '',
pagerActiveClass: 'active_slide',
slides: '> div',
centerHorz: true,
centerVert: true,
speed: 1000
});
// initialize scrollsteps plugin
$slider.scrollsteps({
up: $slider.cycle('prev'),
down: $slider.cycle('next')
});
});
And, when I start to scroll the page up and down, I get the following error message from firebug console:
"TypeError: i.down is not a function" or "TypeError: i.up is not a function"
Perhaps someone has any ideas or thoughts why this error may occur?
If I use a default mousewheel init (without scrollsteps plugin) - everything worked fine:
$slider.mousewheel(function(e) {
if (e.deltaY > 0) {
$slider.cycle('prev');
} else {
$slider.cycle('next');
}
});
but it triggers a lot of scrolling events.
Maybe I'm solve this problem incorrectly ? If somebody knows other solutions - will be very grateful for the help.
Hello,
Thanks for your great plugin.
I tried it and it worked well, but it seems like fixed elements out of the pages doesn't actually stick on the window, just like it's in relative position.
Have you noticed such issue ?
Thanks,
Bbemol
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.