Hello word !
I have question with the function ScrollTop.
I have 5 div and I want to force the scroll to the next div. But i can not !
JQUERY :
- $(document).ready(function(){
- var heightSize= $(window).height();
-
- $("#header, #bloc1, #bloc2, #bloc3, #bloc4")
- .css({
- "height" : heightSize,
- })
-
-
- $(window).scroll(function () {
- $("html:not(:animated), body:not(:animated)").animate({
- scrollTop: heightSize
- })
- });
-
- })
HTML :
- <div id="header">
- </div> <!-- header -->
-
- <div id="bloc1">
- </div>
-
- <div id="bloc2">
- </div>
-
- <div id="bloc3">
- </div>
-
- <div id="bloc4">
- </div>