JQuery UI dialog - *Dialog not a function* error

前端 未结 7 650
天命终不由人
天命终不由人 2021-01-01 17:35

I am developing a site using pinax. In one of my templates I am trying to open a simple jquery dialog box. However I keep getting the \"Dialog not a function\" javascript er

7条回答
  •  误落风尘
    2021-01-01 18:07

    The answer by Doug Neiner helped really. My case was a bit more complicated, but still comes to same point:

    I opened a dialog from Page A which loads Page B like this:

    $('#MyDiv').dialog({
        autoOpen: false
    })
    $("#MyDiv").load("PageB.aspx", function () {
        $("#MyDiv").dialog("open");
    });
    

    The problem is that both Page A and B had included jQuery. Be aware: if you are loading another page into a dialog, it does not need to include same js.

提交回复
热议问题