jQuery UI确认对话框 - 操作输出 [英] jQuery UI confirmation dialog - manipulating output

查看:110
本文介绍了jQuery UI确认对话框 - 操作输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要修改对话框的确认按钮。我想要确认和取消按钮交换(所以取消在右边不在确认按钮的左边)。我也想改变确认按钮上的背景图像,使它是不同的颜色。我想到在单独的jQuery代码这样做,这样我不必深入UI代码和修改它。首先可以这样做?



其次,如果我用css类'ui-dialog-buttonpane'作为我的选择器来抓取div。它是围绕按钮控件的div。如何选择JUST确认按钮?有没有办法我可以说我想要一个包含文本'confirm'的类型按钮的子控件。



TIA



Lloyd

解决方案

1)按照您希望他们出现的顺序排列对话框设置中的按钮。 p>

2) $('。ui-dialog-buttonpane')。children('button')[1]


I need to modify the dialog confirmation buttons. I want to have the confirm and cancel buttons swapped around (so cancel is to the right not the left of the confirm button). I also want to change the background image on the confirm button so that it's a different colour. I thought about doing this in seperate jQuery code so that I don't have to dig into the UI code and modify it. First of all can this be done?

Secondly if I grab the div with the css class 'ui-dialog-buttonpane' as my selector. Which is the div surrounding the button controls. How can I select JUST the confirm button? Is there a way I can say I want a child control of type button that contains the text 'confirm'?

TIA

Lloyd

解决方案

1) order the buttons in the dialog settings in the order you wish them to appear.

2) $('.ui-dialog-buttonpane').children('button')[1]

这篇关于jQuery UI确认对话框 - 操作输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆