1

我将 jqwidgets 用于窗口弹出和 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 会得到结果,但之后我的“显示/隐藏”窗口或点击图表不再起作用。

有什么建议吗?谢谢!

4

1 回答 1

4

去掉$document.ready里面onClick2()

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
    });
}
于 2015-05-25T16:57:54.833 回答