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>
Also in JavaScript:
- foreach async typescript
- overlapping times javascripts html django
- javascript sort array of ints
- compare two arrays javascript
- lodash remove element from array
- Javascript get current year
- display none in jquery
- js set visibility on timeout
- (node:14372) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added to [process]. Use emitter.setMaxListeners() to increase limit
- img onerror
- removing first item array js
- npm can i use my modules without specifying the path
- RFC8259 json
- ajax call to load a page on scrolling
- .fetch method
- convert timestamp to date js
- react check if window exists
- ajax .put
- dummy api json
- self invoked function javascript
- kill all node process ubunut
- i18n react meta description
- how to wait for a function to finish in javascript
- input type date doesn't work in ie