I have created an app in codeigniter that fetches some json data via ajax and displays it on the page.
What i am trying to achieve is to load in a div per fan that is essentially just a box containing their details.
I have this working fine with the code below but would love to add animation to it so the boxes kind of slide in with a small interval between each one. So far ive had no luck adding animation.
Could anyone please advise on how best to go about it? I'm not even sure the append method is the best way as I will essentially be using a templated div t
function get_fans(){
$.ajax('http://localhost/facebook_app/selectFans/', {
type : 'get',
dataType: 'json',
success : function (data) {
$.each(data, function(index) {
$('section#fans').append('<div class="fan">' + data[index].first_name + ', ' + data[index].location +'</div>');
});
},
error: function () {
$('section#fans').text('Could not load fans.');
}
});
}