Hi,What I try to accomplish here is when I type in some number on “modelBid” field it add itself with the foodmin field, then displays total inside text {{TotalBiddingCost}} . I’m aware that there’re several solutions out there but I wonder if this can be done using Meteor template helpers.
Please see the below code:
client.js
Template.vip_view.events({
‘onkeyup #modelBid’: function() {
var bid = parseInt($(’#modelBid’).val());
var foodcost = parseInt($(’#foodmin’).val());
var total = parseInt($(‘total’).val( bid + foodcost));
console.log(total)
Session.set(“TotalBiddingCost”, total);
return total;
}
});