Can anyone help me modify this JavaScript code so that the background image moves from top to bottom instead of left to right?
<script>
$(function(){
var y = 0;
setInterval(function(){
y+=1;
$('body').css('background-position', '0 ' + y + 'px');
}, 10);
})
</script>
body {
background-image: url('img/bg-body.jpg');
background-repeat: repeat-x;
background-size: 100% 100%;
}
Appreciate any assistance! P.S.: Found the original code snippet here: enter link description here