تا اینجاش را رفتم ولی با اولین اسکرول میره به آخرین id
$(function () { var lastScroll = 0;
$(window).scroll(function (event) {
var st = $(this).scrollTop();
if (st > lastScroll) {
if (st > 0 && st < ($(window).height())) {
$(window).stop().scrollTop($('#Chap').offset().top );
}
if (st > $(window).height() && ($(window).height() * 2)) {
$(window).stop().scrollTop($('#soft').offset().top );
}
if (st > ($(window).height() * 2) && ($(window).height() * 3)) {
$(window).stop().scrollTop($('#adv').offset().top) ;
}
}
else {
if (st > $(window).height() && ($(window).height() * 2)) {
$(window).stop().scrollTop($('#home').offset().top );
}
if (st > ($(window).height() * 2) && ($(window).height() * 3)) {
$(window).stop().scrollTop($('#chap').offset().top );
}
}
lastScroll = st;
});
});