alpine js cdn

269

alpinejs cdn -

<script defer src="https://unpkg.com/[email protected]/dist/cdn.min.js"></script>

alpine js cdn -

<html>
  <head>
    ...
 
    <script defer src="https://unpkg.com/[email protected]/dist/cdn.min.js"></script>
  </head>
  ...
</html>

alpine js -

<div x-data="{ open: false }">
    <button @click="open = true">Open Dropdown</button>

    <ul
        x-show="open"
        @click.away="open = false"
    >
        Dropdown Body
    </ul>
</div>

Comments

Submit
0 Comments