user2583714 user2583714 - 1 year ago 79
Javascript Question

Trigger event on dialog box open

My dialog box is defined under the div


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

$("#dialogbox").dialog({open: function(){

But this doesnt seem to trigger when dialog box is opened
Please help

Answer Source

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 :

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download