$(document).ready(function () {
// Animate the faq accordion opening and closing
const faqItems = $(".FAQItem__Container-sc-1airv0w-0");
faqItems.click(function () {
const headingChild = $(this).find(".FAQItem__Plus-sc-1airv0w-2");
const bodyChild = $(this).find(".FAQItem__BodyContainer-sc-1airv0w-3");
const isClosed = headingChild.hasClass("eYLGie");
headingChild
.toggleClass("eYLGie", !isClosed)
.toggleClass("itErmr", isClosed);
if (isClosed) {
// Animate the body of the faq
bodyChild.css("height", "auto");
const autoHeight = bodyChild.height();
bodyChild.css("height", "0px");
bodyChild.animate({ height: autoHeight }, 150);
} else {
// Animate the body of the faq
bodyChild.animate({ height: 0 }, 150);
}
});
// Change the pricing plan when the user clicks on a Personal plan
const billedText = $(".cOcUQl");
const priceText = $(".kJcGSm.personal-pricing");
billedText.click(function () {
console.log("Clicked", billedText.text());
if (billedText.html().includes('checked')) {
billedText.html(' Billed Annually');
priceText.html("US11ドルper month");
} else {
billedText.html(' Billed Annually');
priceText.html("US9ドルper month");
}
});
// Change the pricing plan when the user clicks on a Team plan
const billedTextTeam = $(".cOcUQl-0");
const priceTextTeam = $(".kJcGSm.team-pricing");
billedTextTeam.click(function () {
console.log("Clicked", billedTextTeam.text());
if (billedTextTeam.html().includes('checked')) {
billedTextTeam.html(' Billed Annually');
priceTextTeam.html("US59ドルper month for 5 members
+11ドル per additional member");
} else {
billedTextTeam.html(' Billed Annually');
priceTextTeam.html("US49ドルper month for 5 members
+9ドル per additional member");
}
});
// Change the pricing plan when the user clicks on an Enterprise plan
const billedTextEnterprise = $(".cOcUQl-1");
const priceTextEnterprise = $(".kJcGSm.enterprise-pricing");
billedTextEnterprise.click(function () {
console.log("Clicked", billedTextEnterprise.text());
if (billedTextEnterprise.html().includes('checked')) {
billedTextEnterprise.html(' Billed Annually');
priceTextEnterprise.html("US169ドルper month for 5 members
+21ドル per additional member");
} else {
billedTextEnterprise.html(' Billed Annually');
priceTextEnterprise.html("US149ドルper month for 5 members
+19ドル per additional member");
}
});
});