assign id to jquery dialog button

后端 未结 5 1224
小蘑菇
小蘑菇 2021-01-30 10:49

How do i assign an an id to a jquery dialog button. I tried the following but it\'s not working

buttons: {
Ok: function() {
id=\"xyz\",
...
5条回答
  •  遥遥无期
    2021-01-30 11:46

    Try this.

    buttons: {
        'MyButton': function() {
            //... configure the button's function
        }
    

    And the id setter

    $('button:contains(MyButton)').attr("id","xyz");  
    

提交回复
热议问题