[英]Javascript doesn't work after call a function
I'm using jqwidgets for windows popout and canvasJS for charts 我正在将jqwidgets用于Windows弹出窗口和canvasJS用于图表
$(document).ready(function () {
$("#jqxwindow1 ").jqxWindow({ height:600, width: 1600, maxWidth: 1600, theme: 'fresh',autoOpen:false });
});
This is the window and i make a chart which on click on label will call a java script function: 这是窗口,我制作了一个图表,单击标签将调用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
}
When i click on label, my main div will got the results but after that my 'show/hide' window or click on chart doesn't work anymore. 当我单击标签时,我的主div将获得结果,但是此后,“显示/隐藏”窗口或单击图表不再起作用。
Any suggestion ? 有什么建议吗? Thanks!
谢谢!
Remove $document.ready
inside onClick2()
. 删除
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
});
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.