问题
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:
1) order the buttons in the dialog settings in the order you wish them to appear.
2) $('.ui-dialog-buttonpane').children('button')[1]
来源:https://stackoverflow.com/questions/1786368/jquery-ui-confirmation-dialog-manipulating-output