for example I call it via newDialog("This is title !", "this is my content");
function newDialog(mytitle, mycontent){
var $dialog = $('<div id="mydialog"></div>')
.html(mycontent)
.dialog({
autoOpen: false,
modal: false,
title: mytitle
});
$dialog.dialog('open');
return false
}
This is the error
Error: $("").html(mycontent).dialog is not a function
What does this mean ? I have made sure all the jquery-UI, and jquery js files are fully loaded using firebug plugin to confirm all of this.
I don't understand why it would suddenly stop working.
I've tried it with $(document).click(newDialog); and $('body').delegate(':not(#mydialog *, #mydialog)','click', newDialog); but the error is not going away. The latter is used so new dialogs will not spawn if the dialog is accidently clicked.
$(top.document).ready(function () {
var fruits = new Array();
$(document).click(newDialog("happy title", "happy content to keep everyone happy"));
//$('body').delegate(':not(#mydialog *, #mydialog)','click', newDialog);
});