Syntax error. Help with one small JS snippet :(
- by Bogdan
Hey guys. I don't know much JS, but I wanted to do some quick work with jQuery.
But I've been staring at this for about an hour and I don't understand what I missed:
<script type="text/javascript">
$('#qty_6035').change(function () {
var substractedQty, stockQty, remQty;
substractedQty = (int) $('#qty_6035').val(); // missing ; before statement
stockQty = (int) $('#orig_qty_6035').val();
$('#rem_qty_6035').html(stockQty-substractedQty);
});
</script>
jQuery library is included at the beggining of the document.
Thanks.