mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-28 13:31:06 +00:00
move section to end
This commit is contained in:
parent
17c3f74e0c
commit
4bc6d532c6
32
www/docs.md
32
www/docs.md
@ -631,6 +631,22 @@ In hyperscript similar functionality is implemented like so:
|
||||
</body>
|
||||
```
|
||||
|
||||
##### `ic-switch-class`
|
||||
|
||||
Intercooler provided the [`ic-switch-class`](http://intercoolerjs.org/attributes/ic-switch-class.html) attribute, which
|
||||
let you switch a class between siblings.
|
||||
|
||||
In hyperscript you can implement similar functionality like so:
|
||||
|
||||
```html
|
||||
<div hx-target="#content" _="on beforeOnLoad.htmx take .active from .tabs for event.target">
|
||||
<a class="tabs active" hx-get="/tabl1" >Tab 1</a>
|
||||
<a class="tabs" hx-get="/tabl2">Tab 2</a>
|
||||
<a class="tabs" hx-get="/tabl3">Tab 3</a>
|
||||
</div>
|
||||
<div id="content">Tab 1 Content</div>
|
||||
```
|
||||
|
||||
##### `X-IC-Redirect`
|
||||
|
||||
Intercooler provided more response headers than htmx does: `X-IC-Refresh`, `X-IC-Redirect` etc. Htmx omits these
|
||||
@ -650,22 +666,6 @@ Then we would write the following hyperscript:
|
||||
</body>
|
||||
```
|
||||
|
||||
##### `ic-switch-class`
|
||||
|
||||
Intercooler provided the [`ic-switch-class`](http://intercoolerjs.org/attributes/ic-switch-class.html) attribute, which
|
||||
let you switch a class between siblings.
|
||||
|
||||
In hyperscript you can implement similar functionality like so:
|
||||
|
||||
```html
|
||||
<div hx-target="#content" _="on beforeOnLoad.htmx take .active from .tabs for event.target">
|
||||
<a class="tabs active" hx-get="/tabl1" >Tab 1</a>
|
||||
<a class="tabs" hx-get="/tabl2">Tab 2</a>
|
||||
<a class="tabs" hx-get="/tabl3">Tab 3</a>
|
||||
</div>
|
||||
<div id="content">Tab 1 Content</div>
|
||||
```
|
||||
|
||||
## <a name="config"></a>[Configuring htmx](#config)
|
||||
|
||||
Htmx allows you to configure a few defaults:
|
||||
|
Loading…
x
Reference in New Issue
Block a user