0

我有三个 highcharts 示例: MY DOMINE.COM | 涂鸦

    <!-- add styles -->
    <link href="css/main.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="../css/miestilo.css" type="text/css" media="all" />

    <!-- add scripts -->
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script>
    <script src="js/highcharts.js"></script>
    <script src="js/gray.js"></script>
    ***<script src="js/chart1.js"></script>
    <script src="js/chart2.js"></script>
    <script src="js/chart3.js"></script>
    <script src="js/chart....js"></script>***

</head>

我想使用按钮 javascript 独立调用它们

<ul>
    <li id='show-a'><a href='javascript:void(0);'>CHART 1</a></li>
    <li id='show-b'><a href='javascript:void(0);'>CHART 2</a></li> 
    <li id='show-c'><a href='javascript:void(0);'>CHART 3</a></li> 
</ul>  

$('#show-a a').live('click',function(){
    firstChart();
    $('#show-a').html('<a href="javascript:void(0);">CHART 1</a>');
});  

$('#show-b a').live('click',function(){
    firstChart();
    $('#show-b').html('<a href="javascript:void(0);">CHART 2</a>');
});

$('#show-c a').live('click',function(){
    firstChart();
    $('#show-c').html('<a href="javascript:void(0);">CHART 3</a>');
});    

http://fiddle.jshell.net/jlbriggs/TRd7f/

类似于这个例子

谁能告诉我我该怎么做?

谢谢

4

0 回答 0