xxxxxxxxxx
$("#dialogbox").dialog({
autoOpen:false,
modal:true,
title: "Use of Open event",
width:300,
open: function( event, ui ) {
setTimeout(function(){alert('hello open');}, 10);
},
focus: function( event, ui ) {
alert('hello focus');
}
});
$('#mybutt').click(function() {
$('#dialogbox').html('<h2>Watch this</h2>An alert box should have opened');
$('#dialogbox').dialog('open');
});