2015-05-25 62 views
1

我使用jqwidgets窗户跳隙和图表
JavaScript不工作后调用函数

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

这是窗口canvasJS和我做一个图表,其上点击标签上会调用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

删除$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 
    }); 
} 
+0

谢谢。这是一半的工作。现在我的功能'点击图表'它的工作,但小工具不会关闭/打开(页面中没有人)后,我点击图表,并在

看到一些结果,所以我认为脚本现在'阻止'现在 – VladutZzZ