Mam taki mały problem, wyciągam sobie dane ajaxem, natomiast przed ich wyciągnięciem chce aby pojawiał sie ładny gif loadera i ogólnie wszystko się udało,
natomiast nie wiedzieć czemu gif zatrzymuje sie na ok 0,5-1sec (przestaje sie kręcić kółeczko

Co ciekawe na chromie wszystko działa ok.
Podejrzewam ze gif sie przywiesza po wczytaniu danych i juz przy wykonywaniu pętli js ale nie jestem pewien.
Ktoś ma jakieś pomysły?
$.ajax({ url: "ajax/lista_pytan_ajax.php", async: true, method: 'post', dataType: "json", data: { }, beforeSend: function() { $('#lista_pytan_table tfoot').html('<tr><td colspan="6"><center>Loading <i class="fa fa-spinner fa-spin"></i></center></td></tr>'); }, success: function(dane) { var tabela=''; tabela += "<tr class='wybor' id='id_" + this.id + "' onclick=edycja(" + this.id + ",'show')>"; tabela += '<td>' + this.id + '</td>'; tabela += '<td>' + this.tresc + '</td>'; tabela += '<td>' + this.data_dodania + '</td>'; tabela += '<td>' + this.start + '</td>'; tabela += '<td>' + this.wlasciciel + '</td>'; tabela += "</tr>"; }); $('#lista_pytan_table tbody').html(tabela); $('#lista_pytan_table').dataTable(); }, }); }