使用AJAX加载图像(jQuery)

i have this script:

$.ajax({
    type: "GET",
    url: '/get.php?id=' + c + '&type=1',
    dataType: "html"
}).done(function (a) {
    $(".playerr:eq(" + b + ")").html(a).show()
});

how can i add an loading image ?

You can use beforeSend and success or done to show and hide the loading image

$.ajax({
    type: "GET",
    url: '/get.php?id=' + c + '&type=1',
    dataType: "html"
}).done(function (a) {
    $(".playerr:eq(" + b + ")").html(a).show();
    $("#img1").hide();
}).beforeSend(function(){
      $("#img1").show();
});