htmx
htmx copied to clipboard
Add next and previous methods to javascript api
As it stands, the javascript API has the following methods for querying elements:
findfindAllclosest
These methods match some of the custom selectors that are supported by the hx-target attribute.
It would be handy if the remaining selectors (next and previous) were made available through a public api in the same way that find and closest are made available.
There seem to be functions that already exist for this (scanForwardQuery and scanBackwardQuery) but they are not public and therefore cannot be used.