I am not sure why this field is not updating with the correct number. It is worth noting that for some reason that any number <1 is rounding in the alert() function. I think all the numbers are just getting rounded down but I don't know another method to get the value that won't do that? Any suggestions?
actual value = 0.03
var citrullineChoice = document.getElementById("citrulline").getElementsByClassName("on").value;
var tyrosineChoice = document.getElementById("tyrosine").getElementsByClassName("on").value;
Here is a fix for what you want: http://codepen.io/emiyake/pen/bwKRQP
I am passing the value to the function, instead of adding it as an attribute value to your element.
<li id="caffeinetwo" class="off" onclick="changeClass(this, 0.03)">250</li>
Also changed your changeClass a bit, so you won't need to change it if you want to add or remove an option in your creation bar.