Hi everyone I was just wondering if anyone know how to convert this css/jquery code into javascript DOM code?
I started coding my entire code using javascript DOM for a project but then I found this code which will make the background image move upwards in an infinite loop.
I just need some help in figuring out how to convert the code since I know nothing about jquery.
$(function(){
var x = 0;
setInterval(function(){
$('body').css('background-position','0'+--x + 'px');
}, 10);
})
html,body { height: 100%; overflow: hidden;}
body {
background-image: url('http://lorempixel.com/1900/1200/');
background-repeat: repeat-y;
background-size: 100% 100%;
}
html,body { height: 100%; overflow: hidden;}
body {
background-image: url('http://lorempixel.com/1900/1200/');
background-repeat: repeat-y;
background-size: 100% 100%;
}
$(function(){
var x = 0;
setInterval(function(){
$('body').css('background-position','0'+--x + 'px');
}, 10);
})