jQuery对话框保存取消按钮样式 [英] jquery dialog save cancel button styling
本文介绍了jQuery对话框保存取消按钮样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的应用程序中使用jquery ui对话框. 如何在jquery对话框中为保存"和取消"按钮设置不同的样式? 因此,保存"比取消"更具吸引力. 我可以对取消"使用超链接,但是如何将其放置在同一按钮面板中?
I am using jquery ui dialogs in my application. How do I style the "Save" and "Cancel" buttons differently in a jquery dialog? So "Save" is more appealing than the "Cancel". I could use a hyper link for "Cancel", but how do I place that in the same button panel?
推荐答案
以下是如何在jQuery UI对话框(版本1.8+)中添加自定义类:
Here is how to add custom classes in jQuery UI Dialog (Version 1.8+):
$('#foo').dialog({
'buttons' : {
'cancel' : {
priority: 'secondary', class: 'foo bar baz', click: function() {
...
},
},
}
});
这篇关于jQuery对话框保存取消按钮样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文