Я использую этот плагин: http://www.spritely.net/
Может кто-нибудь сказать мне, почему переменная $ sprite не выполняется повторно
function animate_header() {
var $sprite = $('#header')
.sprite({
fps: 30,
no_of_frames: 4,
// the following are optional: new in version 0.6...
start_at_frame: 1,
rewind: false,
on_last_frame: function(obj) {
// you could stop the sprite here with, e.g.
obj.spStop();
}
})
.active();
}
var init = setInterval("animate_header()", 1000);
Я тоже пробовал это:
function animate_header() {
$('#header')
.sprite({
fps: 30,
no_of_frames: 4,
// the following are optional: new in version 0.6...
start_at_frame: 1,
rewind: false,
on_last_frame: function(obj) {
// you could stop the sprite here with, e.g.
obj.spStop();
}
})
.active();
}
var init = setInterval("animate_header()", 1000);
Сама функция выполняется каждую секунду. Но спрайт не делает.