The issue here is the id's of your month totals also have the same prefix of
txtJan
just like your items. There are multiple ways to fix this. Simplest is to change the prefix of the total field to something else - in this case I just changed it to
txtItemJanTotal
. I have forked your fiddle and fixed the issue there. Check it out!
http://jsfiddle.net/nXT7k/[
^]
Another way is, during your $.each looping, check if the id is of the format txtJan[0-9] using Regex.
Hope this helps!