by rolae · 6y ago · 0 comments
Of course you can do similar things as you would do in Intercooler, but it would be explicit in the Javascript part. See this example they give for prefetching dropdown content from the server
<div x-data="{ open: false }">
<button
@mouseenter.once="
fetch('/dropdown-partial.html')
.then(response => response.text())
.then(html => { $refs.dropdown.innerHTML = html })
"
@click="open = true"
>Show Dropdown</button>
<div x-ref="dropdown" x-show="open" @click.away="open = false">
Loading Spinner...
</div>
</div>No comments yet.