基本上我想jQuery ui dialog
在同一个页面的任何地方使用,我怎么能用这个?
我编写了以下代码,并且我需要自定义所需的东西
$( "#dialog-confirm" ).dialog({
resizable: false,
height:140,
modal: true,
autoOpen: false,
buttons: {
"Okay": function() {
$( this ).dialog( "close" );
return true;
},
Cancel: function() {
$( this ).dialog( "close" );
return false;
}
}
});
$('.trashImage').live('click', function (event) {
some value= "Item0289478"
// Open DialogBox and pass some value to show user that, you are going to delete this
if it is true
{
// go to delete
}
else
{
back.....to page
}
});
我怎么能这样做,我在同一页面中有许多不同的事件。