Is it possible to set the ID for the buttons in a jQuery UI dialog, so that I can refer to them later through jQuery? For example, trigger events, disable etc?
... in the dialog setup ... buttons: {                    "Sök": function () {         var bValid = true;     },     "OK": function () {         if (OK()) {             getStuffNoteringar($("#txtStuffId").val());             $(this).dialog("close");         }     }  .... later on in some javascript code....  $('#OK').click();  
                $("#myDialog").dialog({   buttons :  {       "MyButton" : {          text: "OK",          id: "okbtnid",          click: function(){              var bValid = true;          }          }     } }); 
                        Or you can do it as an array:
$("#myDialog").dialog({    buttons :  [{       text: "OK",      id: "ok",      click: function(){          alert("clicked");      }       }] });   http://docs.jquery.com/UI/Dialog
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