jQuery(document).ready(function ($) { $('#calculate').on('click', function () { var service = $('#service-type').val(); var quantity = $('#quantity').val(); // Simple cost calculation logic (you can customize this as needed) var cost = 0; switch (service) { case 'checkup': cost = 50; break; case 'filling': cost = 100; break; case 'root-canal': cost = 200; break; case 'teeth-whitening': cost = 150; break; } var totalCost = cost * quantity; $('#result').html('Total Cost: $' + totalCost); }); });