I am using Jquery's dialog() method to create dialog. I am creating buttons on the dialog while creating the dialog, using
$("#divName").dialog({
buttons:
{
"Cancel":{
I have one event on which I need to hide the button,but don't know which attributes to use. Please tell me the attributes to hide button. Thanks in advance.
The . modal(“hide”) method hides the modal on button click.
HTML. Here, we will see how to remove the close button on the jQuery UI dialog using CSS. Approach: By setting the display property of the ui-dialog-titlebar-close class element to none.
If you're trying to hide the "cancel" button, try this.
$('.ui-dialog-buttonpane button:contains("cancel")').button().hide();
When you create the dialog, you describe the buttons and the attributes of the buttons, so add an "id" attribute to the button:
buttons: [ { text: "Save", id: "btnId", click: function() { ... } } ]
You can then use the id as a jquery filter for the hide() and show() methods:
$("#btnId").hide()...
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