Hello,
I'm using the following code to create a Dialog box using JQUERY/UI:
var $dialog2 = $('<div id="sharerdialog2"></div>')
.html('<p>Loading...</p>')
.dialog({
autoOpen: false,
title: 'Image Stuffer',
position: ['center',150],
width: 450,
focus:function(event, ui) {
$('#dialogcloser').click(function() {
$dialog.dialog('close');
});
},
open: function(event, ui) {
$("#sharerdialog2").load("MyURL.com");
}
});
I'm trying to call the Dialog to have it open, but JQUERY isn't finding it using the following:
$dialog2.dialog('open');
Strangely, if I add the following after the above, it does work on a BIND:
$('#ttttt').click(function() {
$dialog2.dialog('open');
});
Any ideas why this is? How can I call the Dialog to open in another function?
Thanks