tall-dinner-62086
03/05/2022, 1:42 AMlate-rainbow-37908
03/05/2022, 5:32 AMstocky-mechanic-87541
03/05/2022, 10:00 AMworried-book-52184
03/05/2022, 1:41 PMmysterious-toddler-20573
03/05/2022, 2:23 PMworried-book-52184
03/05/2022, 2:32 PMmysterious-toddler-20573
03/05/2022, 2:34 PMjolly-kite-167
03/05/2022, 4:44 PMworried-book-52184
03/05/2022, 7:20 PM<whatever hx-post=/endpoint hx-trigger="sendonenter" _="install SendOnEnter">
behavior SendOnEnter()
on keyup[key is "Enter"]
trigger sendonenter
end
endacoustic-school-80051
03/05/2022, 7:24 PMhtml
<div id="my-image" hx-get="{% url 'gallery' %}?page{{ page_obj.number|add:1 }}"
hx-trigger="revealed" hx-swap="afterend">
How do I trigger it manually from javascript? I tried this
javascript
htmx.trigger("#my-image", "revealed")
but it does nothing. When running it in the console, it returns true but no ajax request is called. Why?
Thanksmysterious-toddler-20573
03/05/2022, 7:51 PMmysterious-toddler-20573
03/05/2022, 7:51 PMacoustic-school-80051
03/05/2022, 8:24 PMacoustic-school-80051
03/05/2022, 8:24 PMacoustic-school-80051
03/05/2022, 8:32 PMacceptable-spring-94420
03/05/2022, 9:04 PMgorgeous-ghost-95789
03/06/2022, 12:45 AMcalm-ice-23682
03/06/2022, 2:04 AMadamant-exabyte-92636
03/06/2022, 8:44 AMwhite-motorcycle-95262
03/07/2022, 7:01 PMred-farmer-97020
03/07/2022, 7:18 PMhx-trigger="load[false]" but it is still making a network request.mysterious-toddler-20573
03/07/2022, 7:24 PMmysterious-toddler-20573
03/07/2022, 7:25 PMmysterious-toddler-20573
03/07/2022, 7:25 PMred-farmer-97020
03/07/2022, 7:25 PMmysterious-toddler-20573
03/07/2022, 7:26 PMhx-no-history-snapshot attribute to allow people to opt specific pages out of history. Want to work w/ me on that?mysterious-toddler-20573
03/07/2022, 7:26 PMmysterious-toddler-20573
03/07/2022, 7:28 PMmaybeFilterEvent (You'd need to create a synthetic "load" event) here: https://github.com/bigskysoftware/htmx/blob/9e3d33f90d495b0415160462333e999fb10a12fa/src/htmx.js#L1616white-motorcycle-95262
03/07/2022, 7:29 PMhx-no-history-snapshot would have to be applied globally to fix this issue? I'm not sure if the cause, but it might be something as "simple" as needing to re-initialize the dropdowns with bootstrap, which I guess wouldn't really be in the domain of HTMX