Investment Calculator
' +
'
' +
'
' +
'
' +
'' +
'Breakdown | ' +
'{{name}} | ' +
'{{#compare}}{{name}} | {{/compare}}' +
'
' +
'' +
'Start Date | ' +
'{{startDate}} | ' +
'{{#compare}}{{startDate}} | {{/compare}}' +
'
' +
'' +
'End Date | ' +
'{{endDate}} | ' +
'{{#compare}}{{endDate}} | {{/compare}}' +
'
' +
'' +
'Start Price/Share | ' +
'{{currency}}{{startPrice}} | ' +
'{{#compare}}{{currency}}{{startPrice}} | {{/compare}}' +
'
' +
'' +
'End Price/Share | ' +
'{{currency}}{{endPrice}} | ' +
'{{#compare}}{{currency}}{{endPrice}} | {{/compare}}' +
'
' +
'' +
'Total Return | ' +
'{{totalReturn}}% | ' +
'{{#compare}}{{totalReturn}}% | {{/compare}}' +
'
' +
'' +
'Compound Annual Growth Rate | ' +
'{{cagr}}% | ' +
'{{#compare}}{{cagr}}% | {{/compare}}' +
'
' +
'' +
'Starting Investment | ' +
'{{currency}}{{startAmount}} | ' +
'{{#compare}}{{currency}}{{startAmount}} | {{/compare}}' +
'
' +
'' +
'Ending Investment | ' +
'{{currency}}{{endAmount}} | ' +
'{{#compare}}{{currency}}{{endAmount}} | {{/compare}}' +
'
' +
'' +
'Years | ' +
'{{years}} | ' +
'{{#compare}}{{years}} | {{/compare}}' +
'
' +
'
' +
'
'
),
beforeRender: function(event,data){
console.log(data);
data.tplData.currency = data.tplData.symbol == '8LS' ? '€' : '$';
},
complete: function(){
$('.calc-input-group .other').on('ifChanged', 'input[type="checkbox"]', function(){
$('input[type=text].calc-compare').toggle();
});
if (!!$.datepicker) {
$(document).unbind('mousedown', $.datepicker._checkExternalClick);
$('html').mousedown($.datepicker._checkExternalClick);
}
},
calculateComplete: function(event){
$(window).resize();
},
});
});