Javascript没有';调用函数后无法工作


Javascript doesn't work after call a function

我将jqwidgets用于windows弹出窗口,将canvasJS用于图表

$(document).ready(function () {
    $("#jqxwindow1 ").jqxWindow({ height:600, width: 1600, maxWidth: 1600, theme: 'fresh',autoOpen:false  });
});

这是一个窗口,我制作了一个图表,点击标签就会调用一个java脚本函数:

function onClick2(e) {
    //$('#test').load(document.URL +  ' #test');
    $(document).ready(function () { /// Wait till page is loaded
        $('#main'+e.dataSeries.testcase).load('index.php?proiect=' + '<?php echo $project; ?>', function () {
            /// can add another function here
        });
    }); //// End of Wait till page is loaded
}

当我点击标签时,我的主div会得到结果,但在那之后,我的"显示/隐藏"窗口或点击图表就不再工作了。

有什么建议吗?谢谢

删除onClick2()中的$document.ready

function onClick2(e) {
    //$('#test').load(document.URL +  ' #test');                       
    $('#main' + e.dataSeries.testcase).load('index.php?proiect=' + '<?php echo $project; ?>', function () {
    /// can add another function here
    });
}