我想要顯示loading.gif點擊jQuery UI對話框與iframe直到頁面加載到iframe中。有人知道這個問題嗎?可能嗎? 這是我的代碼:顯示loading.gif直到頁面加載到iframe裏面的jQuery UI對話框
$('.dialog').click(function(e) {
e.preventDefault();
var $this = $(this);
var horizontalPadding = 30;
var verticalPadding = 30;
$('<iframe id="externalSite" class="externalSite" src="' + this.href + '" />').dialog({
title: ($this.attr('title')) ? $this.attr('title') : 'External Site',
autoOpen: true,
width: 800,
height: 500,
modal: true,
buttons: {
"Zatvori": function() {
$(this).dialog("close");
}
},
resizable: true,
autoResize: true,
overlay: {
opacity: 0.5,
background: "black"
},
close: function(event, ui) {
$(function() {
var theVal = $.cookies.get('updatedForm');
if (theVal != null) {
$.cookies.del('updatedForm');
location.reload(true);
}
});
}
}).width(800 - horizontalPadding).height(500 - verticalPadding);
也許通過用ui對話框實現塊ui?但是如何? – Ogi 2010-09-21 09:37:54