Trigger event on dialog box open

后端 未结 4 1499
误落风尘
误落风尘 2021-02-05 06:18

My dialog box is defined under the div

#dialogbox

When the dialog box opens i want to trigger an event such that it alerts open. The code im us

4条回答
  •  情书的邮戳
    2021-02-05 06:54

    You can use this :

    $( ".selector" ).dialog({
      open: function( event, ui ) {}
    });
    

    or the event listener .on

    $( ".selector" ).on( "dialogopen", function( event, ui ) {} );
    

    More information in this page :

    http://api.jqueryui.com/dialog/#event-open

提交回复
热议问题