# Pricing table customization

**URL:** https://community.elfsight.com/t/pricing-table-customization/40979
**Category:** Customization
**Tags:** pricing-table
**Created:** [February 15, 2024, 7:05am UTC](https://community.elfsight.com/t/pricing-table-customization/40979 "2024-02-15T07:05:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Mauro\_Berno](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/mauro_berno/32/8833_2.png) [@Mauro\_Berno](https://community.elfsight.com/u/Mauro_Berno)
#### Post date: [February 15, 2024, 7:05am UTC](https://community.elfsight.com/t/pricing-table-customization/40979/1 "2024-02-15T07:05:40Z")

</div>

Can we change the shape or the toggle in the pricing table?

---

<div class="post-metadata">

### Author: ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)
#### Post date: [February 15, 2024, 12:47pm UTC](https://community.elfsight.com/t/pricing-table-customization/40979/3 "2024-02-15T12:47:44Z")

</div>

Hi @Mauro_Berno 👋

Could you please share a link to the page where your widget is installed and specify the shape of the toggle you’d like to have? I’ll be happy to check if it’s feasible 🙂

---

<div class="post-metadata">

### Author: ![Mauro\_Berno](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/mauro_berno/32/8833_2.png) [@Mauro\_Berno](https://community.elfsight.com/u/Mauro_Berno)
#### Post date: [February 19, 2024, 12:45am UTC](https://community.elfsight.com/t/pricing-table-customization/40979/4 "2024-02-19T00:45:04Z")

</div>

Hi Max,

here the link where it is installed:  
[https://www.egnpeernetwork.com/membership-my](https://www.egnpeernetwork.com/membership-my)

i was looking do a different toggle shake like a button, please find the picture attached.  
 ![Screenshot 2024-02-19 at 08.44.17](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/6/7/67f61b8806a1ad77f52fb7c437ed6fb707404ee2.png)

---

<div class="post-metadata">

### Author: ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)
#### Post date: [February 19, 2024, 3:27pm UTC](https://community.elfsight.com/t/pricing-table-customization/40979/5 "2024-02-19T15:27:00Z")

</div>

Thanks!

I’ve forwarded your request to our devs and they’ll try to customize the widget for you. I’ll keep you updated 🙂

---

<div class="post-metadata">

### Author: ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)
#### Post date: [February 20, 2024, 10:36am UTC](https://community.elfsight.com/t/pricing-table-customization/40979/6 "2024-02-20T10:36:29Z")

</div>

Thank you for waiting @Mauro_Berno

Please add this script right after the widget installation code:

```auto
<script>
const waitForElement = (selector, root = document) => new Promise(res => {
  let i = 0;

  const check = () => {
    const component = root.querySelector(selector);

    if (component) {
      res(component);
    } else if (i !== 50) {
      setTimeout(check, 100);
      i++;
    }
  };

  check();
});

waitForElement(".eapps-pricing-table-toggle-container").then(toggleContainer => {
  toggleContainer.firstChild.style.display = "none";
  
  const items = [...document.querySelectorAll(".eapps-pricing-table-toggle-item")];
  const handleChange = (e) => {
    items[+e.target.checked].click();
  }
  
  const switchContainer = document.createElement("label");
  switchContainer.id = "switch";
  
  const switchInput = document.createElement("input");
  switchInput.type = "checkbox";
  switchInput.addEventListener("change", handleChange);
  
  const switchSlider = document.createElement("span");
  switchSlider.id = "switch-slider";
  
  const styleElem = document.createElement("style");
  const [firstItem, secondItem] = items;
  styleElem.innerHTML = `.eapps-pricing-table-toggle-container:before {content: '${firstItem.textContent.replace(/\n/g, '')}';} .eapps-pricing-table-toggle-container:after {content: '${secondItem.textContent.replace(/\n/g, '')}';}`;
  toggleContainer.appendChild(styleElem);
  
  switchContainer.append(switchInput, switchSlider);
  toggleContainer.append(switchContainer);
});
</script>

```

And this code should be added to the Custom CSS field on the Appearance tab of your widget’s settings:

```auto
#switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

#switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

#switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 34px;
}

#switch-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 50%;
}

input:checked + #switch-slider {
  background-color: #4fbfe6;
}

input:focus + #switch-slider {
  box-shadow: 0 0 1px #4fbfe6;
}

input:checked + #switch-slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

.eapps-pricing-table-toggle-container:before {
  display: flex;
  align-items: center;
  margin-right: 10px;
  max-width: 100px;
}

.eapps-pricing-table-toggle-container:after {
  display: flex;
  align-items: center;
  margin-left: 10px;
  max-width: 100px;
}

```

Check it out and let me know if it helped 🙂
