html jquery条形图插件无法使条形链接 [英] html jquery bar chart plugin unable to make the bars link
本文介绍了html jquery条形图插件无法使条形链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下是条形图插件的链接:
jchart JQuery插件演示 [ ^ ]。
但问题是我想要使所有栏都链接,如果用户点击它,它将重定向用户在该特定栏中的给定链接。但我无法做到'请帮助我提前谢谢
这里是代码
Here is a link of a bar chart plugin :
jchart JQuery plugin demos[^].
But the problem is that i want to make all the bars link and if user click on that it will redirect the user on given link in that particular bar . but i am not able to do it 'please help me thanks in advance
here is the code
<div class="BodyGC">
<div id="Div1" data-sort="true" data-width="300" class="jChart chart-sm" name="">
<div class="define-chart-row" data-color="#009182" title="1">13</div>
<div class="define-chart-row" data-color="#009182" title="2">24</div>
<div class="define-chart-row" data-color="#AFCD14" title="3">17</div>
<div class="define-chart-row" data-color="#AFCD14" title="4">10</div>
<div class="define-chart-row" data-color="#AFCD14" title="5">12</div>
<div class="define-chart-row" data-color="#009182" title="6">8</div>
<div class="define-chart-footer">10</div>
<div class="define-chart-footer">20</div>
<div class="define-chart-footer">30</div>
</div>
<script>
$(document).ready(function () {
$("#Div1").jChart();
});
</script>
</div>
链接文字添加到反映文章/质量保证标题。
更正格式和语法问题。
添加预
标签。
[/ Edit]
推荐答案
( document )。 ready( function (){
(document).ready(function () {
( #Div1)。jChart();
});
< / script >
< / div >
("#Div1").jChart(); }); </script> </div>
链接文字添加到反映文章/质量保证标题。
更正格式和语法问题。
添加预
标签。
[/编辑]
是的,经过一番研究和尝试,我能够添加点击功能。
解决方案
您需要为主容器div
内的所有条形附加click事件。代码是......
Yes, after some research and tries, I was able to add the click functionality.
Solution
You need to attach the click event for all the bars inside that main containerdiv
. The code for that is...
这篇关于html jquery条形图插件无法使条形链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文