Search
 
SCRIPT & CODE EXAMPLE
 

HTML

alpine extract data to script tag

<div x-data="dropdown">
    <button @click="toggle">Toggle Content</button>
 
    <div x-show="open">
        Content...
    </div>
</div>
 
<script>
    document.addEventListener('alpine:init', () => {
        Alpine.data('dropdown', () => ({
            open: false,
 
            toggle() {
                this.open = ! this.open
            },
        }))
    })
</script>
Comment

PREVIOUS NEXT
Code Example
Html :: <input type="hidden" name="csrfmiddlewaretoken" value="TNNT72Wz6HAqopeqbKM4JbX21iWVhZudluidEACoyvh8DoUcJAPcp0RQaVwmS06m" 
Html :: etiqueta blockquote en html5 
Html :: Strip off tags in text 
Html :: HTML JWB2 
Html :: close button 
Html :: center_div 
Html :: llegar puntual 
Html :: HTML <del Element 
Html :: insert html in word 
Html :: input type number is not showing decimal cases when is 0.00 html 
Html :: get all classes in a html file 
Html :: how to import html to html file to get code into the html file 
Html :: How to display data from database in HTML 
Html :: canonical syntax 
Html :: sematic ui modals 
Html :: week days in table format in html 
Html :: Load webpage from html string 
Html :: bootstrap force majuscule class 
Html :: upwork 
Html :: valley 
Html :: java.rmi.connectexception: connection refused to host: 127.0.0.1 
Html :: how to change db cred in wordpress 
Html :: html picture unpressable 
Html :: HOW TO PERFORM AN ACTION AN OPTION IS CLICKED IN DROP DOWN 
Html :: create a string of 1024 characters 
Html :: html pass attribute to react 
Html :: <pre; html tag that preserves spacing 
Html :: Jawaban 1 
Html :: how to remove whitespace below my footer in html 
Html :: keep favicon 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =