1
0
Caleb Porzio 3 жил өмнө
parent
commit
4f33b05fd2
1 өөрчлөгдсөн 5 нэмэгдсэн , 5 устгасан
  1. 5 5
      index.html

+ 5 - 5
index.html

@@ -8,11 +8,11 @@
     <!-- <script src="https://unpkg.com/alpinejs@3.0.0/dist/cdn.min.js" defer></script> -->
 
     <!-- Play around. -->
-    <div x-data="{ html: '<span x-text=&quot;foo&quot;></span>', foo: 'bar' }">
-        <template x-if="true">
-            <h1>yoyoyo</h1>
-        </template>
+    <div x-data="{ open: false }">
+        <button @click="open = !open">Toggle</button>
 
-        <div x-html="html"></div>
+        <span x-show="open">
+            Content...
+        </span>
     </div>
 </html>