This commit is contained in:
Carson Gross 2022-05-27 12:16:49 -06:00
parent 0d50bc85fa
commit 8bba9c140a
3 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ By removing these arbitrary constraints htmx completes HTML as a
## quick start
```html
<script src="htmx.min.js" defer></script>
<script src="htmx.min.js"></script>
<!-- have a button POST a click via AJAX -->
<button hx-post="/clicked" hx-swap="outerHTML">
Click Me

View File

@ -9,7 +9,7 @@ htmx supports the [`hx-confirm`](/attributes/hx-confirm) attribute to provide a
In this example we will see how to use [sweetalert2](https://sweetalert2.github.io) to implement a custom confirmation dialog.
```html
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11" defer></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<button hx-trigger='confirmed'
hx-get="/confirmed"
_="on click
@ -31,7 +31,7 @@ A VanillaJS implementation is left as an exercise for the reader. :)
{% include demo_ui.html.liquid %}
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11" defer></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script>

View File

@ -33,7 +33,7 @@ By removing these arbitrary constraints, htmx completes HTML as a [hypertext](ht
## quick start
```html
<script src="htmx.min.js" defer></script>
<script src="htmx.min.js"></script>
<!-- have a button POST a click via AJAX -->
<button hx-post="/clicked" hx-swap="outerHTML">
Click Me