Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo-mod-jslibs-dist.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'alpinejs/packages/docs/src/en/magics/root.md')
-rw-r--r--alpinejs/packages/docs/src/en/magics/root.md21
1 files changed, 0 insertions, 21 deletions
diff --git a/alpinejs/packages/docs/src/en/magics/root.md b/alpinejs/packages/docs/src/en/magics/root.md
deleted file mode 100644
index e07e8e8..0000000
--- a/alpinejs/packages/docs/src/en/magics/root.md
+++ /dev/null
@@ -1,21 +0,0 @@
----
-order: 7
-prefix: $
-title: root
----
-
-# `$root`
-
-`$root` is a magic property that can be used to retrieve the root element of any Alpine component. In other words the closest element up the DOM tree that contains `x-data`.
-
-```alpine
-<div x-data data-message="Hello World!">
- <button @click="alert($root.dataset.message)">Say Hi</button>
-</div>
-```
-
-<!-- START_VERBATIM -->
-<div x-data data-message="Hello World!" class="demo">
- <button @click="alert($root.dataset.message)">Say Hi</button>
-</div>
-<!-- END_VERBATIM -->