Created
August 30, 2020 01:26
-
-
Save pryley/306f77a1bdbe8b90e158fd9de10d216f to your computer and use it in GitHub Desktop.
alpinejs close popup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div x-data="{ show: !localStorage.getItem('hide-popup') }"> | |
<div x-show="show"> | |
<button @click="localStorage.setItem('hide-popup', true); show = false"> | |
close | |
</button> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment