Add Add-ons data to Payment Summary
I have add-ons list with plus, minus icon for increment and decrements count. When user click on + icon name and price with count should added to payment summary. I have used foreach but its not working.
- $('.js-plus-icon').on('click',function(){
- //code
- }
- $('.js-plus-minus').on('click',function(){
- //code
- }
- //html
- <div class="input-group" style="margin-bottom: 5px;">
- <span class="input-group-btn">
- <button type="button" class="btn btn-torq js-minus-icon 1" data-minus-addon="1" data-price="1200">
- <span class="glyphicon glyphicon-minus"></span>
- </button>
- </span>
- <input type="text" placeholder="0" class="form-control count 1" value="0" min="0" style="text-align: center;" required="" readonly="" data-addons-name="ABC" data-price="1200">
- <span class="input-group-btn">
- <button type="button" class="btn btn-torq js-plus-icon 1" data-plus-addon="1" data-price="1200">
- <span class="glyphicon glyphicon-plus"></span>
- </button>
- </span>
- </div>
Above will be dynamic list and more list. I want to add if user click on + plus icon add addon data to div and if count become 0 remove addon from div
- <div class="addon_data">append here data</div>