Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oxwazz/learn-htmx-1
https://github.com/oxwazz/learn-htmx-1
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/oxwazz/learn-htmx-1
- Owner: oxwazz
- License: mit
- Created: 2023-09-09T10:13:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-11T12:18:10.000Z (over 1 year ago)
- Last Synced: 2023-09-11T14:07:44.629Z (over 1 year ago)
- Language: HTML
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# learn-htmx-1
version [email protected]
## AJAX requests - [docs](https://htmx.org/docs/#ajax)
```
- hx-get
- hx-post
- hx-patch
- hx-put
- hx-delete
```
### ✅ hx-get
```html
Get Todo (click me)
```
### ✅ hx-post
```html
Create Todo (click me)
```
### ✅ hx-patch
```html
Edit Patch Todo (click me)
```
### ✅ hx-put
```html
Edit Put Todo (click me)
```
### ✅ hx-delete
```html
Delete Todo (click me)
```## Triggering Requests - [docs](https://htmx.org/docs/#triggers)
```
Standard Events =>
- click (triggered on click)
- change (triggered on blur)
- etcStandard Event Filters =>
- [] (triggered when event filter is true, e.g. click[altKey])Standard Event Modifiers =>
- once (only trigger once)
- changed (trigger only if value has changed)
- delay: (triggered after delay, e.g. delay:1s)
- throttle: (triggered at most once per timing declaration, e.g. throttle:1s)
```### ✅ once
```html
Trigger me (click, run only once)
```### ✅ changed
```htmlresult```
### ✅ delay
```htmlresult
```### ✅ throttle
```htmlresult```
✅
☑️
❓