Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/oxwazz/learn-htmx-1


https://github.com/oxwazz/learn-htmx-1

Last synced: about 1 month ago
JSON representation

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)
- etc

Standard 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
```html

result

```

### ✅ delay
```html

result

```

### ✅ throttle
```html

result

```


☑️