Answers for "alpine js disable button"

27

javascript disable button

//disable the button
document.getElementById(BUTTON_ID).disabled = true;
//reable the button
document.getElementById(BUTTON_ID).removeAttribute('disabled');
Posted by: Guest on September-22-2020
7

javascript disable button

document.getElementById(BUTTON_ID).disabled = true;
Posted by: Guest on January-24-2020
0

alpine js open outside div

<div x-data="{id: 1}">
    <button @click="$dispatch('open-dropdown',{id})">Open Dropdown</button>
</div>

<ul x-data="{ open: false }"
    x-show="open"
    @open-dropdown.window="if ($event.detail.id == 1) open = true"
    @click.away="open = false">
    Dropdown Body
</ul>
Posted by: Guest on October-11-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language