我希望剩余边距在某一点停止
var data = $('#nexttologodiv').css('margin-left');
var init = 220,
$page = $('#nexttologodiv').css('margin-left', init);
console.log(data);
window.onscroll = function() {
if (data == '220px'){
$page.removeClass( 'scrolled' );
console.log(window.scrollY);
$page.css('margin-left', init - window.scrollY * 2);
}
else if (window.scrollY <= 48) {
$page.css('margin-left', 0 - window.scrollY);
}}
}