htmx icon indicating copy to clipboard operation
htmx copied to clipboard

Add next and previous methods to javascript api

Open Batleram opened this issue 5 months ago • 0 comments

As it stands, the javascript API has the following methods for querying elements:

  • find
  • findAll
  • closest

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.

Batleram avatar Aug 06 '25 17:08 Batleram