javascript - JQUERY, Calling a Dialog that I created? Not finding it -
I am using the following code to create a dialog box using JQUERY / UI:
< Pre> var $ dialog2 = $ ('div id = "sharerdialog2"> ;). HTML ('& lt; p & gt; Loading ... & lt; / p & gt;') .dialog ({autoOpen: false, title: 'image stuffer', status: ['center', 150 (Function () {$ dialog.dialog ('off');});}, open: function (event) , UI) {$ ("# sharerdialog2"). Load ("MyURL.com");}}); I'm trying to call the dialog to open it, but JQUERY is not using the following: $ dialog2. Dialog ('open'); Strangely, if I add the following after the above, then it works on a BIND: $ ('# ttttt') . () {$ Dialog2.dialog ('Open');});
Any ideas why this is? How can I communicate to open in another function?
Thank you
You should wrap your code in a domain event handler:
$ (document) .ready (function () {$ dialog2.dialog ('open');});
Comments
Post a Comment