lundi 25 janvier 2016

loading does not stop after data sent to html

My HTML Code is like this :

<div class="loading"></div>  

My Javascript Code is like this :

... 
$parent.find('.loading').html('<img src="http://ift.tt/1PwvLqC"> loading...');

$.ajax({
    ...
    success: function (response) {
        for(i=0; i<response.SearchAvailResponse.Hotel.length; i++){
            //console.log(response.SearchAvailResponse.Hotel[i].HotelNo); The result : 1 2
            $parent.find('.loading').append(response.SearchAvailResponse.Hotel[i].HotelNo);
        }
    }
});  

After HotelNo has been sent to html, loading does not stop. Look here : http://ift.tt/1JyyJPj

Why did it happen?

Any solution to solve my problem?

Thank you



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire