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
Try this:
jsFiddle here
HTML:
Javascript/jQuery:
$("#dialogbox").dialog({
autoOpen:false,
modal:true,
title: "Use of Open event",
width:300,
open: function( event, ui ) {
alert('hello');
}
});
$('#mybutt').click(function() {
$('#dialogbox').html('Watch this
An alert box should have opened');
$('#dialogbox').dialog('open');
});