开发者

Line breaks between buttons in jQuery dialog box

开发者 https://www.devze.com 2022-12-16 02:50 出处:网络
I have a jQuery dialog box with three buttons. It looks like: Would you like to proceed to the signup page?

I have a jQuery dialog box with three buttons.

It looks like: Would you like to proceed to the signup page?

          < More Info > < OK > < Cancel >

Is there any way to put a line break between buttons so that I end up with: Would you like to proceed to the signup page?

                        < OK > < Cancel >
                       开发者_StackOverflow     < More Info >


Use the dialogClass option to add a custom class to the dialog and then write some CSS to style the s in a way that makes them appear one per line. The best method I've found is setting float: none and clear: both.


Like this:

$('#dialog .ui-dialog-buttonpane button:last').css('clear', 'both');

You'll also need to make the button last, not first.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号