I have a simple form with a few checkbox options and a submit button. What I would like to accomplish is that when a visitor selects one or more options, the total price (sum) will be shown after clicking the button.
The total (sum) must be placed in the last div with id 'uk-total-price'. The basic value is the price without extra options. The basic value, in this case 19.500, is visible.
Is it possible with javascript or jquery to make this work?
<form>
<div id="uk-form-checkbox">
<input id="option 1" class="uk-checkbox-box" value="100" name="option 1" type="checkbox">
<label for="option 1" >option 1</label>
<input id="option 2" class="uk-checkbox-box" value="250" name="option 2" type="checkbox">
<label for="option 2" >option 2</label>
<input id="option 3" class="uk-checkbox-box" value="500" name="option 3" type="checkbox">
<label for="option 3" >option 3</label>
</div>
<div id="uk-form-submit">
<button id="submit" class="uk-submit-button" type="submit">Calculate Total</button>
</div>
<div id="uk-total-price">19.500</div>
</form>