score:2

Accepted answer

1) Remove all extra commas (see: http://jsfiddle.net/FG9Fq/6/). In general use jsLints or jsHints (in jsFiddle) to make your code a little better.

2) Define function in that way: drawchart = function() { //set it global Example: http://jsfiddle.net/FG9Fq/7/

3) I advice to create simple container (array for example), and when you will drop element add that element to that container. Then you will be able pretty fast look through that array and od something with that items.


Related Articles