如何删除此jquery对话框,并在单击按钮时将其显示为网页底部的简单html表单。当我点击添加新记录按钮时,我显示了一个引导程序表,它显示了对话框模态,但我想让它变成简单的html表单而不会弹出
$(function () {
var new_dialog = function (type, row) {
var dlg = $("#dialog-form").clone();
var email = dlg.find(("#email")),
password = dlg.find(("#password"));
type = type || 'Create';
var config = {
autoOpen: true,
height: 400,
width: 450,
modal: true,
buttons: {
"Create an account": save_data,
"Cancel": function () {
dlg.dialog("close");
}
},
close: function () {
dlg.remove();
}
};
if (type === 'Edit') {
config.title = "Edit User";
get_data();
delete(config.buttons['Create an account']);
config.buttons['Edit account'] = function () {
row.remove();
save_data();
};
}
dlg.dialog(config);
答案 0 :(得分:0)
不确定它是否有效,但请尝试。将false
设置为modal
属性,并在配置中添加position
和top
属性;
modal: false,
position: 'relative',
top: 0,
或者,在html代码中,使用模态内容删除Div的class
属性。