document.addEventListener('DOMContentLoaded', function () { // Shared Basic Subscription const sharedBasicPrices = { 1: 89, 3: 200, 6: 350, 12: 650, 24: 1200, 36: 1800, 60: 3000 }; const sharedBasicSubscriptionOptions = document.querySelectorAll('.sharedBasicSubscriptionOptions'); sharedBasicSubscriptionOptions.forEach(function (options) { options.addEventListener('change', function () { const selectedValue = parseInt(this.value); const priceElement = this.closest('.feature').querySelector('.sharedBasicPrice'); const price = sharedBasicPrices[selectedValue]; priceElement.textContent = `$${price}`; }); }); // Shared Plus Subscription const sharedPlusPrices = { 1: 169, 3: 400, 6: 700, 12: 1300, 24: 2400, 36: 3600, 60: 6000 }; const sharedPlusSubscriptionOptions = document.querySelectorAll('.sharedPlusSubscriptionOptions'); sharedPlusSubscriptionOptions.forEach(function (options) { options.addEventListener('change', function () { const selectedValue = parseInt(this.value); const priceElement = this.closest('.feature').querySelector('.sharedPlusPrice'); const price = sharedPlusPrices[selectedValue]; priceElement.textContent = `$${price}`; }); }); // Shared Basic Subscription const sharedPowerPrices = { 1: 89, 3: 200, 6: 350, 12: 650, 24: 1200, 36: 1800, 60: 3000 }; const sharedPowerSubscriptionOptions = document.querySelectorAll('.sharedPowerSubscriptionOptions'); sharedPowerSubscriptionOptions.forEach(function (options) { options.addEventListener('change', function () { const selectedValue = parseInt(this.value); const priceElement = this.closest('.feature').querySelector('.sharedPowerPrice'); const price = sharedPowerPrices[selectedValue]; priceElement.textContent = `$${price}`; }); }); });