Skip to content

Instantly share code, notes, and snippets.

@EminenceHC
Created July 14, 2014 23:58
Show Gist options
  • Save EminenceHC/c11075ac49b6564bc9ed to your computer and use it in GitHub Desktop.
Save EminenceHC/c11075ac49b6564bc9ed to your computer and use it in GitHub Desktop.
Ignore non-number values during sum calculation
function calculateSum() {
var sum = 0;
$(".sum-hours").each(function() {
sum += parseFloat(this.value);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment