Saturday 15 May 2010

javascript - Show chart if button clicked, close it if clicked again -


I got this code from a plugin to display a chart and I only clicked a button to The chart for the chart is: "Title", "Title", "Title", "Title", Title: "Berlin", "Title", "Title", "Title", "Title": "," "#", Title: "", "" " ", Value: 20, color:" #FFF "},"] );}};

HTML

  div id = "doughnutChart" class = "chart" & gt; & lt; / div & Gt;   

will do some simple jQuery

  $ (Document) .ready (function () {$ ("button"). Click (function () {$ ("# doughnutChart"). Toggle ();});});  

Edit

Add your code below to Wide. Basically change line 307 to javascript:

  $ (document) .ready (function () {$ ("# something"). Click (function () {if ($ ( ($ ('(': Visible ')). (': Visible ')) {$ (".dennetchart"). Hide (); $ (".dentartvert"). Html ("& lt; div id = \ "DoughnutChart \" class = \ "(title:" Tokyo ", value: 100, color:" # 2C3E50 "}, {title:" "" "" "title:", "," title: "," color "," Title: "Berlin", Price: 20, Color: "#FFF", "$$" (".7.248"}, {title: "Sydney", value: 40, color: "#D7DADB"}, {title: }] "). Show ();}});});  

No comments:

Post a Comment