Hallo, I've got something like this:
$(document).ready(function(){
$("#all").height($(window).height()-60);
$('a').bind({
mouseover:function(){
$(this).stop().animate({opacity:0.8},500);
},
mouseout:function(){
$(this).stop().animate({opacity:1},500);
},
click:function(){
}
});
// CLOUDS SCROLL
function cloudScroll(){
var current=parseFloat($('#clouds').css('left'));
current += 1;
$('#clouds').css("left",current);
}
var init = setInterval('cloudScroll()', 270);
});
Seems to be quite easy but anyway it returns: cloudScroll is not defined.
Why?
Try passing the function directly, using a string is quite obsolete:
var init = setInterval(cloudScroll, 270);
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