i am using this code and it's working correct moving from top to bottom but i want to move continuously not single time. Thanks!!
$(document).ready(function(){
var bodyHeight = $('body').height();
var footerOffsetTop = $('#moving').offset().top;
var topToBottom = bodyHeight -footerOffsetTop;
$('#moving').css({top:'auto',bottom:topToBottom});
$("#moving").delay(100).animate({
top: '100px',
}, 3000);
})
$(document).ready(function() {
setInterval(function(){
var bodyHeight = $('body').height();
var footerOffsetTop = $('#moving').offset().top;
var topToBottom = bodyHeight - footerOffsetTop;
$('#moving').css({
top : 'auto',
bottom : topToBottom
});
$("#moving").delay(100).animate({
top : '100px',
}, 3000);
}, 3200);
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With