asda

alert(\"hi\");","data":0},{"label":"a","data":0}]; $.plot('#placeholder', data, { series: { pie: { show: true, radius: 11/16, innerRadius: 0.3 } }, legend: { show: false } }); var total = 0; $("#voteCount").html(total+" Votes").fadeIn(); updateWithSockets(); //.fadeIn(); } function updateWithSockets() { socket.on("b2388a1cdc0a7d2b3608dc273d4bb9de", function(payload) { console.log(payload); var plObj = JSON.parse(payload); var data = plObj.voteData; var total = plObj.total; $.plot('#placeholder', data, { series: { pie: { show: true, radius: 11/16, innerRadius: 0.3 } }, legend: { show: false } }); // end of plot console.log(' '); console.log('votes '); console.log(total); console.log(' '); $("#voteCount").html(total+" Votes").fadeIn(); }); // end of socket } }); // update plot with websockets