Response title
This is preview!
Each of the variables is text and must be converted to a number. You could also do the conversion when assigning the values to the variables and that would likely be cleaner.
if(currentId == "draggable1"){ var myInt1 = parseInt($('#MealplanCalsPerServing1').val()); } if(currentId == "draggable2"){ var myInt2 = parseInt($('#MealplanCalsPerServing2').val()); } if(currentId == "draggable3"){ var myInt3 = parseInt($('#MealplanCalsPerServing3').val()); }
That should take care of it.
© 2013 jQuery Foundation
Sponsored by and others.