This div [#divSaveAndDistribute] appears only once. how can i make it appear anytime it is triggered? Thanks
pic1 = new Image(16, 16);
pic1.src = "images/loader.gif";
$(document).ready(function(){
$("#save").live('click',function() {
//alert("you just clicked me");
var table="products_tb";
$("#status").html('<img src="images/loader.gif" align="absmiddle"> Checking empty fields...');
$("#dialog-confirm").dialog("open");
var dataString = 'table='+table;
//alert(dataString);
//$("#alert").fadeIn(200).html('<img src="images/load/ajax-loader.gif" align="absmiddle">');
$.ajax({
type: "POST",
url: "checkEmpty.php",
data: dataString,
cache: false,
success: function(html)
{
// $("#alert").fadeOut(200);
// $(".confirm").easyconfirm();
$("#status").html(html);
// $("#pled").val("");
}
//clear_form_elements("form#CommentForm");
});
});
$( "#dialog:ui-dialog" ).dialog( "destroy" );
$( "#dialog-confirm" ).dialog({
autoOpen: false,
resizable: false,
height:200,
width:400,
modal: true,
buttons: {
"check": function() {
$( this ).dialog( "close" );
},
Cancel: function() {
$( this ).dialog( "close" );
//alert("you just offed me");
$('#divSaveAndDistribute').show();
}
}
});
It should be help full: $( "#dialog-confirm" ).dialog("open"); $( "#dialog-confirm" ).dialog("close");
On the bottom of this site: http://jqueryui.com/demos/dialog/ you have list of methods, events and options
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.