I am working on asp.net mvc. I am trying to display a form in jquery dialog box, like
$("#dialog-editinvitem").dialog({
autoOpen: false,
width: 420,
resizable: false,
modal: true,
buttons: {
OK: function () {
//...
},
Cancel: function () {
$(this).dialog("close");
}
},
close: function () {
}
});
it works fine. the buttons in the dialog-box are displayed at lower bottom of the dialog. but i need to display the buttons at the top left corner of the dialog box after the dialog title bar. I have tried with some jquery code to position the button panel like,
var btnset = $(this).parent().children('.ui-dialog-buttonpane').html();
$(this).parent().children('.ui-dialog-buttonpane').remove();
$("<div class='ui-dialog-buttonpane ui-widget-content ui-helper-clearfix'>" + btnset + "</div>").insertAfter($(this).parent().children('.ui-dialog-titlebar'));
$('.ui-dialog-buttonset').css('float', 'left');
$('.ui-dialog-buttonpane').css('border-width', '0px 0px 1px 0px');
the button panel successfully positioned at top left corner but it doesnot fire button click events. Please guide me.