I have a webpage that I load my data from XML files to DIVs.
In this Example I have DIV
with this attribute: class="Group"
;
Also this is my JS code:
$(document).ready(function () {
$.get(Root + "/Feed_Products/Groups", {}, function (xml) {
var output = '';
$('item', xml).each(function (i) {
var Name = $(this).find("Name").text();
var Id = $(this).find("Id").text();
var Link = Root + '/Group' + Id;
output += '<a href="' + Link + '">' + Name + '</a>';
});
$(".Group").append(output);
});
});
As you know, loading XML has delay and its not as fast as direct database request.
How can I show small loading GIF on each DIV that is loading XML?