jQuery dialog buttons - How to set the dir to be rtl/ltr OR how to place the buttons in left corner of the dialog

StackOverflow https://stackoverflow.com/questions/5001199

سؤال

Hi after goggling for a while and going over all previous answers that i found i decided to ask this in here:

I got a dialog which is opened and shown as RTL all the stuff is displayed in RTL, all but the buttons that, now matter what i do stays in the bottom right corner

I want to place the buttons in the button left corner as should be displayed in RTL direction I wen over all the Q/A i found in stackoverflow , but nothing have worked for me :/ [code] $("#ccDialog").dialog({

    minHeight: 100,
    minWidth: 500,
    modal:true,
    resizable:false,
    buttons: [
        {
            text: "Ok",
            click: function() { $(this).dialog("close"); }


        },
        {
            text: "Cancel",
            click: function() { $(this).dialog("close"); }
        }
    ]

});
$('.ui-dialog-titlebar-close').remove();
$("#ccDialog").height("700");

[/code]

I tried to add class / dir attribute, but without success...

Thanks ahead,

Daniel.

هل كانت مفيدة؟

المحلول

Just add this to your css and the dialog buttons will be on the left instead of right.

.ui-dialog-buttonset{
float:left;
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top