Created
July 14, 2014 23:58
-
-
Save EminenceHC/c11075ac49b6564bc9ed to your computer and use it in GitHub Desktop.
Ignore non-number values during sum calculation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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