offline docs
This commit is contained in:
17
offline-docs/alpinejs/magics/el.md
Normal file
17
offline-docs/alpinejs/magics/el.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Alpine.js Documentation - Magics
|
||||
|
||||
Magics are special properties that are available inside Alpine expressions. They provide convenient access to common functionality.
|
||||
|
||||
## [$el](/magics/el)
|
||||
|
||||
`$el` is a magic property that can be used to retrieve the current DOM node.
|
||||
|
||||
```
|
||||
<button @click="$el.innerHTML = 'Hello World!'">Replace me with "Hello World!"</button>
|
||||
```
|
||||
|
||||
[← x-id](/directives/id)
|
||||
|
||||
[$refs →](/magics/refs)
|
||||
|
||||
Code highlighting provided by [Torchlight](https://torchlight.dev/)
|
||||
Reference in New Issue
Block a user