我想为 jquery 对话框添加一个额外的属性。
$(".pipeline-dialog").dialog({
dialogClass: "dialog_status,
autoOpen: false
});
如何在创建对话框时添加诸如“dialog-status”之类的属性。
有什么方法可以做到这一点?
最佳答案
试试这个:
$(".pipeline-dialog").dialog({
//initial value for custom attribute
customAttribute: "value"
});
//get value
var customAttrValue = $(".pipeline-dialog").dialog("option", "customAttribute");
//set new value
$(".pipeline-dialog").dialog("option", "customAttribute", "new value");
关于jquery-ui - 如何为 jquery UI 对话框添加自定义属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17717035/