14 Commits

Author SHA1 Message Date
Paweł Korzeniewski
0ce391e924
Use correct extended CSS selector name in hx-trigger notes section (#2964) 2024-10-13 10:08:10 +02:00
Bracken
08369730b6
Clarify event filter uses in hx-trigger (#2914)
* Clarify event filter uses in hx-trigger

* Change hx-trigger event filter example to avoid ambiguity

input is both a tag and an event.

* Document the scope difference between standard selector and event filter

from:input listens to the page and click[event.target.matches('input')] listens to the element.

* Document that event filters as an alternative to CSS selectors require eval

* Move note about eval to standard event filters section.

* Simplify the referenced to standard event filters in the standard event modifiers section, and link to the standard event filters section instead.

* End quote in the correct place in standard event modifier doc.

* Correct language on how event filters from:body receive events.

* hx-trigger filter example catches click events specifically.
2024-10-04 09:26:09 +02:00
Christopher Jefferson
10f45c321e
Clarify that hx-trigger:from doesn't dynamically update (#2696)
* Fix typo

* Clarity that 'from' doesn't update as the page changes
2024-07-08 11:50:17 -06:00
Jonathan Rietveld
7ef95e8963
Allow CSS selectors with whitespace in hx-trigger (#1913)
* Allow CSS selectors with whitespace in `hx-trigger`

Parsing of `hx-trigger` scans for whitespace, so if a CSS selector is used that contains whitespace, e.g. `form input`, a syntax error is raised.
A workaround is implemented by allowing such a CSS selector to be wrapped in either curly braces or parentheses.

* Add explanation whitespace in CSS selector to docs

* Tests for CSS selectors containing whitespace

* Use faster RegEx test, remove redundant variable declarations

* Added Descendant Combinator support to `root` and `target` modifiers

* Add missing semicolon

* Tests for descendant combinators in `root` and `target` modifiers

* Improve descendant combinator test coverage
2023-11-16 13:45:46 -07:00
Vincent
7274454360
[New feature] selector-less next and previous targets (#1478)
* nextElementSibling and previousElementSibling target selectors

* Renamed nextElementSibling => next, previousElementSibling => previous
2023-10-06 22:25:03 -06:00
Carson Gross
4cb85e9856 Merge remote-tracking branch 'origin/dev' into dev 2023-07-25 12:56:19 -06:00
Oliver Djursing
c59fe799e8
Update hx-trigger throttle documentation (#1609) 2023-07-20 14:29:13 -04:00
Vincent
fd912f807f
Make it clear that from with a selector gets all matching elements (#1582) 2023-07-17 01:07:56 -04:00
Carson Gross
2edb023f20 Merge branch 'master' into dev
# Conflicts:
#	www/content/docs.md
2023-07-14 13:52:14 -06:00
Yann Salaün
21f333c218
Fix typo (#1556) 2023-07-10 15:53:28 -06:00
Ben Croker
e9234823a2
Improve wording 2023-06-30 22:06:27 +03:00
Vincent
dd53ca0a75
Doc - make it clear that closest can return the element itself #1487 (#1488) 2023-06-15 11:48:32 -06:00
Carson Gross
47bdec5fbc Merge branch 'gohugo' into dev
# Conflicts:
#	www/attributes/hx-target.md
#	www/content/docs.md
#	www/content/events.md
#	www/content/examples/animations.md
#	www/reference.md
#	www/static/test/index.html
2023-04-06 11:04:36 -06:00
Daniel J. Summers
f690d92834 Replace www directory 2023-03-18 11:29:38 -04:00