Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- javascript:(function(){ var total = function(selector) {var h = $(selector).map(function() { return $(this).text(); }); var sum = 0; $.each(h, function(index, item) { if (!isNaN(parseFloat(item))) sum += parseFloat(item); }); return sum;};var e = total(".estimated_hours");var s = total(".spent_hours");var r = e - s; alert("Estimated: " + e + " / Spent: " + s + " / Remaining: " + r)})();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement