次のようなコードを使用して、JQuery Ajax を使用してサーバーからテーブルのコンテンツを取得します。
success: function(data)
{
//once I get the data, remove the old content from table
$('.tableBody').empty();
// then repopulate the table
$.each(data, function(key,val) {
//process the data, add different icons, texts...,append it to my table
showTable(key, val);
});
}
これはうまくいきます。しかし、問題は、テーブルに多くの行があるため、再入力に約 300 ミリ秒かかる (empty()約 10 ミリ秒しかかからない) ため、短い間、テーブルが空白になることです。
"empty()"との間にアニメーションを追加"showTable()"して、空白の画面を回避し、シームレスに移行できる方法はありますか?