latest changes
This commit is contained in:
@@ -2,7 +2,17 @@ import './styles/app.scss';
|
||||
import htmx from 'htmx.org';
|
||||
|
||||
window.htmx = htmx;
|
||||
document.body.addEventListener('htmx:beforeRequest', function () {
|
||||
document.getElementById('request-failed').hidden = true;
|
||||
});
|
||||
|
||||
document.body.addEventListener('htmx:responseError', function () {
|
||||
document.getElementById('request-failed').hidden = false;
|
||||
});
|
||||
|
||||
document.body.addEventListener('htmx:sendError', function () {
|
||||
document.getElementById('request-failed').hidden = false;
|
||||
});
|
||||
document.addEventListener('click', (event) => {
|
||||
const button = event.target.closest('[data-weather-location]');
|
||||
if (!button) return;
|
||||
|
||||
Reference in New Issue
Block a user