1
heigths変数の ".bottom_down i"関数で指定された値が反映されていない".bottom_up i"。ヘルプ、私は問題がここにあると思うのJs最初の関数の変数の値が2番目の値に反映されていません
var heights = 0;
$('.bottom_up i').click(function() {
\t heights = heights - window.innerHeight;
\t window.scrollTo(300, heights);
\t alert('Bottom_up ='+ heights);
\t $('.bottom_down').animate({opacity: '1'}, 1200);
\t if (heights = window.innerHeight){
\t \t $('.bottom_up').animate({opacity: '0'}, 1200);
\t }else{
\t \t $('.bottom_up').animate({opacity: '1'}, 1200);
\t }
\t return false;
});
$('.bottom_down i').click(function() {
heights = heights + window.innerHeight;
window.scrollTo(300, heights);
$('.bottom_up').animate({opacity: '1'}, 1200);
alert('Bottom_down ='+ heights);
});
$(window).scroll(function() {
\t if($(window).scrollTop() + window.innerHeight == $(document).height()) {
\t \t $('.bottom_down').animate({opacity: '0'}, 1200);
\t }
});