Friday, 17 February 2017

How do I add an integer value with javascript (jquery) to a value that's returning a string

<span id="price"> 8 </span>
var currentValue = $('#price').innerHTML;
var newValue = parseInt(currentValue) + 1

1 comment: