mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-03 15:55:39 +00:00
Update modal-custom.md
Update modal example to use new wait for <eventName> syntax
This commit is contained in:
parent
6ab08790b8
commit
e25b7920bb
@ -25,7 +25,7 @@ We'll define some nice animations in CSS, and use some Hyperscript events (or al
|
|||||||
|
|
||||||
### Modal HTML Fragment
|
### Modal HTML Fragment
|
||||||
```html
|
```html
|
||||||
<div id="modal" _="on closeModal add .closing then wait 150ms then remove me">
|
<div id="modal" _="on closeModal add .closing then wait for animationend then remove me">
|
||||||
<div class="modal-underlay" _="on click trigger closeModal"></div>
|
<div class="modal-underlay" _="on click trigger closeModal"></div>
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<h1>Modal Dialog</h1>
|
<h1>Modal Dialog</h1>
|
||||||
@ -140,7 +140,7 @@ We'll define some nice animations in CSS, and use some Hyperscript events (or al
|
|||||||
// routes
|
// routes
|
||||||
init("/modal", function(request){
|
init("/modal", function(request){
|
||||||
return `
|
return `
|
||||||
<div id="modal" _="on closeModal add .closing then wait 150ms then remove me">
|
<div id="modal" _="on closeModal add .closing wait for animationend then remove me">
|
||||||
<div class="modal-underlay" _="on click trigger closeModal"></div>
|
<div class="modal-underlay" _="on click trigger closeModal"></div>
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<h1>Modal Dialog</h1>
|
<h1>Modal Dialog</h1>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user