I am using tumblr theme that is scrolling sideways (this is the theme http://smpldesign.tumblr.com/post/4547439061/sleep-wave-2-0)
can someone show me how to make the background change to red on scroll? and then when it stops scrolling it reverts back to white?
this is what i put in css of this theme:
body {font-size: {text:Font Size}px; font-family: {font:Body};
color: {color:Text}; text-align:justify; height:100%;
}
body {background:#F50;
transition:all 400ms ease-in;
}
.scrolling {
background:#FF0;
transition:all 400ms ease-in;
}
table tr {
vertical-align: top;
});
this is what i put before closing body tag:
{/block:Posts}
</div>
</div>
<script>
$(document).on('scrollstart',function(){
$('body').addClass('scrolling');
});
$(document).on("scrollstop",function() {
$('body').removeClass('scrolling');
}); </script>
});
it's not working for me.
i put the entire code here in a pastebin