mysterious-toddler-20573
07/14/2022, 1:08 AMclever-dinner-48156
07/14/2022, 1:18 AMhx-preserve
or just let it be (will connect and disconnect on every page change)modern-smartphone-82132
07/14/2022, 3:30 AMancient-father-3063
07/14/2022, 8:42 AMhtml
<input class="form-check-input" type="checkbox" value="8" id="filteroutunplayed" hx-get="{% url 'statstable' %}" hx-target="#statstable" hx-swap="outerHTML">
ancient-father-3063
07/14/2022, 8:43 AMancient-father-3063
07/14/2022, 8:43 AMancient-father-3063
07/14/2022, 8:44 AMtall-dinner-62086
07/14/2022, 9:39 AMmodern-smartphone-82132
07/14/2022, 10:45 AMancient-father-3063
07/14/2022, 12:58 PMancient-father-3063
07/14/2022, 12:59 PMmysterious-toddler-20573
07/14/2022, 1:00 PMimportant-van-94053
07/14/2022, 1:13 PMtall-dinner-62086
07/14/2022, 1:19 PMpowerful-helmet-42757
07/14/2022, 1:30 PMboost
to navigate trough one of my site and I want to run some Js each time a new page loads.
Is htmx:load
a good event to listen to? Maybe combined with checking the HX-Boosted
header?
I'm relatively OK with that but I'm curious to see other solutions.mysterious-toddler-20573
07/14/2022, 1:34 PMonLoad
function that allows you to execute some javascript every time new content is loaded into the DOM via an htmx-driven request, akin to the jQuery ready
function: https://htmx.org/docs/#3rd-partypowerful-helmet-42757
07/14/2022, 1:39 PMselect
with url params. I want to sync them when landing or navigating to the page, but not each time htmx load
stuff, since all of these select
already trigger hx-get
.powerful-helmet-42757
07/14/2022, 1:40 PMload
comes from a boost
mysterious-toddler-20573
07/14/2022, 1:40 PMmysterious-toddler-20573
07/14/2022, 1:40 PMmysterious-toddler-20573
07/14/2022, 1:42 PMpowerful-helmet-42757
07/14/2022, 1:42 PMmysterious-toddler-20573
07/14/2022, 1:42 PMpowerful-helmet-42757
07/14/2022, 1:43 PMpowerful-helmet-42757
07/14/2022, 1:44 PMhtmx.load
and headers.powerful-helmet-42757
07/14/2022, 1:54 PMselected
attribute to an option
, HTMX will keep the selected value in the memory cache. This kinda fixes it for me. I get my synched select
when initially loading the page, and values are kept when using navigating back
and forward
.acoustic-autumn-94211
07/14/2022, 1:58 PMlate-king-98305
07/14/2022, 2:08 PMbrave-dog-98297
07/14/2022, 2:26 PM