TN-DEVV / TN-rental

31 stars 14 forks source link

Price is not getting cut from bank or cash if i don't change no of days. #3

Open SarangGit opened 7 months ago

SarangGit commented 7 months ago

Please Update script.js file

from this ->>>

$(document).on('click', '.car-box .car-item', function (e) { carPrice = $(this).data('price') carName = $(this).data('name') $('.car-box .car-item').css('background-color','rgba(64, 66, 68, 0.3') $('.car-box .car-item').css('border','none') $('.car-box .car-item').children('i').css('color','#545f5d') $('.car-box .car-item').children('.name').css('color','#88888e')

$(this).css('background-color','rgb(9, 66, 57,0.5)') $(this).css('border','1px solid #15c7a3') $(this).children('i').css('color','#15c7a3') $(this).children('.name').css('color','#15c7a3') $('.total-price').text("$" + carPrice) $(".day-text").text(1 + " Day") })

to this ->>>

$(document).on('click', '.car-box .car-item', function (e) { carPrice = $(this).data('price') carName = $(this).data('name') $('.car-box .car-item').css('background-color','rgba(64, 66, 68, 0.3') $('.car-box .car-item').css('border','none') $('.car-box .car-item').children('i').css('color','#545f5d') $('.car-box .car-item').children('.name').css('color','#88888e')

$(this).css('background-color','rgb(9, 66, 57,0.5)') $(this).css('border','1px solid #15c7a3') $(this).children('i').css('color','#15c7a3') $(this).children('.name').css('color','#15c7a3') $('.total-price').text("$" + carPrice) $(".day-text").text(1 + " Day") newPrice = carPrice //Add this to resolve this issue })