Im trying to animate one elment after another, but I have some troubles with this
$.getJSON('http://localhost/json/example/json.json', function(data){
var ele = jsonElements(data);
for(var i = 1; i <= ele; i++)
{
$('#test').append('<a href="#" id="t_'+i+'" class="block-icon"></a>');
$('#t_'+i).animate({
'top': data['t_'+i]['top'],
'left': data['t_'+i]['left']
}, 800).delay(1000);
}
});
It works, but all elements have animation in same time, any advice how to make it one after another?
call one_by_one(i);
I added an example on http://jsfiddle.net/VS8tQ/64/