$.ajax({
type:"GET",
url:"<?php echo Yii::app()->request->baseUrl; ?>/admin/"+urlPage+"?t=ajax&img="+$("#image_name").val()+"&w="+
thumb_width+"&h="+thumb_height+"&x1="+x_axis+"&y1="+y_axis,
cache:false,
success:function(rsponse)
{
$("#cropimage1").hide();
$("#thumbs1").html("");
if(th_size == '1'){
$("#thumbs").html("<img src='<?php echo Yii::app()->request->baseUrl; ?>/upload/temporary/thumb/"+rsponse+"?version="+Math.ceil(Math.random()*100)*10+"' /><input type='button' class='save-btn' onclick='refresh();' name='save' value='<?php echo Yii::t(Yii::app()->session["translator"], "Save and continue");?>'>");
$('html, body').animate({ scrollTop: $('#thumbs').offset().top }, 'slow');
document.getElementById("small_image").value =rsponse;
//alert(document.getElementById("small_image").value)
}
}
ここでは、ajax 呼び出しからの応答で動的に div id "thumbs" をロードしています。この親指 div 内には、画像と送信ボタンがあります。問題は、送信ボタンがすばやく読み込まれることですが、画像が重い場合、読み込みに時間がかかることです。画像の後にロードする送信ボタンを作成するにはどうすればよいですか?