Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

113
Views
AlpineJS deshabilita x-on: haga clic si ocurrió alguna condición

Mi problema:
Quiero deshabilitar el x-on:click en el step = 1 . Entonces, si está en el sitio web y actualmente está en el step = 1 , el botón no funcionará, solo funcionará si se activa el step = 2 . ¿Es algo así posible con AlpineJS?

El código:

 <a href="#" x-on:click="step = 1, checkout = ! checkout">Clicking</a>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Simplemente puede adjuntar el controlador solo si el paso es> 1 con fe el operador lógico AND:

 <a href="#" x-on:click="step > 1 && yourClickHandler()">Clicking</a>

En ese caso, debe escribir un método yourClickHandler donde haga lo que quiera.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!