Init dump

This commit is contained in:
Jason Jordan
2025-11-24 08:22:44 -05:00
parent d48bb96791
commit 3fbece7da6
73 changed files with 1747 additions and 121 deletions
@@ -0,0 +1,22 @@
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["divA"] // Add targets for all your divs
connect() {
this.toggleDivs() // Call on connect to set initial state
}
toggleDivs() {
const selectedValue = this.element.querySelector('select').value;
console.log("sv: ")
// Hide all divs first
this.divATarget.classList.add("hidden");
// Show the relevant div based on selection
if (selectedValue === "cig+") {
this.divATarget.classList.remove("hidden");
}
}
}