Posts

Code

 Script: $(document).ready(function () {     const products = {};     // Add New Product Button Click     $('#addProductBtn').click(function () {         const productName = $('#productName').val();         const productPrice = $('#productPrice').val();         if (productName && productPrice) {             products[productName] = parseFloat(productPrice);             $('#productName').val('');             $('#productPrice').val('');             $('.productDropdown').append(new Option(productName, productName));         } else {             alert('Please enter both product name and price.');         }     });     // Handle Product Selection     $(document).on('change', ...
Recent posts