//AMOUNT CALCULATOR
var totalAmount = 0;
var serviceAmount = 0;
jQuery('.select-service').click(function(){
var serviceAmount = parseInt(jQuery(this).parent().html().replace(/\D/g,''));
if(jQuery(this).is('.selected')){
jQuery(this).removeClass('selected');
totalAmount -= serviceAmount;
jQuery('#total-amount').html(totalAmount);
}else{
jQuery(this).addClass('selected');
totalAmount += serviceAmount;
jQuery('#total-amount').fadeIn('slow').html(totalAmount);
}
});
//AMOUNT CALCULATOR
is this code efficient and secure? I am PHP dont know if it is required or not to judge.. Please any Help/feed back would be awesome! really trying to better my coding..