Skip to content

Instantly share code, notes, and snippets.

@ZiTAL
Created April 11, 2014 12:09
Show Gist options
  • Save ZiTAL/10463038 to your computer and use it in GitHub Desktop.
Save ZiTAL/10463038 to your computer and use it in GitHub Desktop.
// first select start and end dates
var sum = 0;
var a = document.querySelectorAll('.bar-wrapper.single > ul > li > span > em');
var l = a.length;
for(var i=0;i<l;i++)
sum = sum + Math.round(a[i].childNodes[0].nodeValue);
window.alert(sum);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment