I want to add two buttons in the dialog's header part along with the 'x' icon, but I can only add the buttons at the bottom of it, even after searching for hours, I didn't get any solution of adding them at the top or changing their position from bottom to top. Please help me out.
$(function(){
var winsize = ["width=400,height=500"];
var newwin = function() {
window.open("http://www.google.com", "New Window", winsize);
$(this).dialog("close");
}
var hide = function() {}
var btns = {
buttons: {
"+": newwin,
"-": hide
}
};
$( "#dialog" ).dialog(btns);
});
It's ugly, but maybe a kick in the right direction...
http://jsfiddle.net/AjKFe/48/
//create dialog
$("#dialog2").dialog({
height: 140,
modal: true,
autoOpen: false
});
//add a button
$("<a href='#' style='float:right; margin-right:1em;'></a>").button({icons:{primary: "ui-icon-plus"},text: false}).insertBefore('.ui-dialog-titlebar-close').click(function(e){
e.preventDefault();
alert("click");
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With