How can I detect that the (X) close button of a jQuery UI Dialog was clicked, separately from the dialogclose/dialogbeforeclose events?

前端 未结 4 1116
遇见更好的自我
遇见更好的自我 2021-02-19 07:43

I\'d like to be able to detect the (x) close button of a jQuery UI Dialogue being clicked, but I don\'t want to use the dialogclose / dialogbeforeclose

4条回答
  •  星月不相逢
    2021-02-19 08:07

    Really good question

    It's working if You use only the click

     $(".ui-dialog-titlebar-close").click( function() { 
            debugger;
            });
    

    But i'm sure there's a reason for the live ?

    I'll continue looking

    And why you don't want to use this ?

    $('.selector').bind('dialogclose', function(event, ui) {
       debugger;
    });
    

提交回复
热议问题