-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplans.js
26 lines (24 loc) · 854 Bytes
/
plans.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// js for plans-duration button
const plansSwitch = document.querySelector(".plans-switch");
const basicPrice = document.querySelector(".basic-price");
const professionalPrice = document.querySelector(".professional-price");
const businessPrice = document.querySelector(".business-price");
const planDuration = document.querySelectorAll(".plan-duration");
plansSwitch.addEventListener('change',() =>{
if(plansSwitch.checked){
basicPrice.innerText= "$349";
professionalPrice.innerText= "$499";
businessPrice.innerText= "$799";
planDuration.forEach(span =>{
span.innerText= "/ year";
})
} else{
basicPrice.innerText= "20K INR";
professionalPrice.innerText= "50K INR";
businessPrice.innerText= "80K INR";
planDuration.forEach(span =>{
span.innerText= "/ month";
})
}
}
)