$(document).ready(function() {
$("#nights").on("keyup", function() {
//var days = $(this).val();
//var pricePerDay = $(".tour").data('daily-price');
//var totalPrice = days * pricePerDay;
//$("#nights-count").text(days);
//$("#total").text(totalPrice);
$("#nights-count").text($(this).val());
$("#total").text($(this).val() * $(this).closest(".tour").data('daily-price'));
});
});
No comments:
Post a Comment