Javascript – hide element on condition using AlpineJS
Using AlpineJS I have the following: <div x-data="pricing()" x-init="data = { plan: 'a' }"> <p><span x-text="calculate() + '€'"></span>per session</p> <select x-model="data.plan"> <option value="a">A</option> <option value="b">B</option> </select> </div> export default function pricing() { return { data: { plan: "", }, calculate()…