i create same scrolling effect tho 1 can see on website : http://blkboxlabs.com/
do have idea how implement it?
the problems struggle are:
- detect scrolling when body has overflow:hidden on it.
- handle 1 time event firing (when scroll detected)
there's simple way it. body wraps principal div can move positioning absolute / fixed , top. can detect mousewheel events jquery plugin.
the plugin: http://plugins.jquery.com/mousewheel/
the example code:
<body> <div class="allcontent"></div> </body> css
body { overflow: hidden; } .allcontent {position: absolute; top:0; } js
$('.allcontent').on('mousewheel', function(event) { console.log(event.deltax, event.deltay, event.deltafactor); }); good luck!
Comments
Post a Comment