ドキュメントの読み込み時に、選択オブジェクトの内容を他の選択ボックスにコピーする関数を実行しています (ネットワーク帯域幅を節約するため)。
関数が完了するまでに数秒かかるため、メインの div をマスクしたいと考えました (何かが起こっていることをユーザーに知らせるため)。
残念ながら、関数が完了するまでマスクは表示されません。
// I want the mask to show immediately here, but never gets shown
$('#unassignedPunchResults').mask('Getting results');
$('.employeeList').each(function (i) {
// this is freezing the browser for a few seconds, the masking is not showing
$('#employeeList option').clone().appendTo(this);
});
$('#unassignedPunchResults').unmask();
mask() 呼び出しの後に javascript を中断してそのイベントをフラッシュして続行し、より長い処理 (each()) の処理中にユーザーがマスクを確認できるようにするにはどうすればよいですか?