CODE
function update_price(){
var price_orig = $('#price_orig').html();
var price_con = $('#price_con').html();
var price_vis = $('#price_vis').html();
var price_vis_con = $('#price_vis_con').html();
if($('#conservation:checkbox').is(':checked')){
if($('#card').val() == 'Mastercard' || $('#card').val() == 'Visa'){
$('#total_price').html(price_vis_con);
$('#total_again').html(price_vis_con);
$('#total_deposit').html(Math.round((price_vis_con / 4)*100)/100);
}else{
$('#total_price').html(price_con);
$('#total_again').html(price_con);
$('#total_deposit').html(Math.round((price_con / 4)*100)/100);
}
}else{
if($('#card').val() == 'Mastercard' || $('#card').val() == 'Visa'){
$('#total_price').html(price_vis);
$('#total_again').html(price_vis);
$('#total_deposit').html(Math.round((price_vis / 4)*100)/100);
}else{
$('#total_price').html(price_orig);
$('#total_again').html(price_orig);
$('#total_deposit').html(Math.round((price_orig / 4)*100)/100);
}
}
}
var price_orig = $('#price_orig').html();
var price_con = $('#price_con').html();
var price_vis = $('#price_vis').html();
var price_vis_con = $('#price_vis_con').html();
if($('#conservation:checkbox').is(':checked')){
if($('#card').val() == 'Mastercard' || $('#card').val() == 'Visa'){
$('#total_price').html(price_vis_con);
$('#total_again').html(price_vis_con);
$('#total_deposit').html(Math.round((price_vis_con / 4)*100)/100);
}else{
$('#total_price').html(price_con);
$('#total_again').html(price_con);
$('#total_deposit').html(Math.round((price_con / 4)*100)/100);
}
}else{
if($('#card').val() == 'Mastercard' || $('#card').val() == 'Visa'){
$('#total_price').html(price_vis);
$('#total_again').html(price_vis);
$('#total_deposit').html(Math.round((price_vis / 4)*100)/100);
}else{
$('#total_price').html(price_orig);
$('#total_again').html(price_orig);
$('#total_deposit').html(Math.round((price_orig / 4)*100)/100);
}
}
}
Its basically changing the price is you select mastercard or visa, adding 2% to the total and it also devides by 4 to get 25% of the total.
It works, and it works great, however ONLY on FF, in IE you need to do the selection, then click on the page to get it to change the price, can anyone see WHY it doesnt update on its own in IE?
Much fanks in advance.!

Sign In
Register
Help




MultiQuote