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

225
Views
Multiple triggers for HTMX?

I'm wondering if it's possible to enable multiple trigger types for HTMX. What I want to do is to trigger HTMX on either content change or page load. So far, if I include both trigger types in hx-trigger, only the first trigger is executed; so in the example below, HTMX is triggered only upon content change.

<select name="area" id="area" hx-post="/api/search" hx-trigger="change load" hx-target="#neighborhood" class="block">
  <option>eby</option>
  <option>nby</option>
  <option>pen</option>
  <option>sfc</option>
  <option>scz</option>
  <option>sby</option>
</select>
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

It's as simple as comma-separating your trigger types:

<select name="area" id="area" hx-post="/api/search" hx-trigger="change, load" hx-target="#neighborhood" class="block">
  <option>eby</option>
  <option>nby</option>
  <option>pen</option>
  <option>sfc</option>
  <option>scz</option>
  <option>sby</option>
</select>
over 4 years ago · Santiago Trujillo 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!