Reload UX JS on htmx events

This commit is contained in:
Éloi Rivard 2023-03-30 21:16:22 +02:00
parent 2fb0085d7b
commit c5e33e30ca

View file

@ -1,7 +1,14 @@
$(function(){ function onDomChanges() {
$('.ui.dropdown').each(function(){ $('.ui.dropdown').each(function(){
$(this).dropdown({"placeholder": $(this).attr("placeholder")}); $(this).dropdown({"placeholder": $(this).attr("placeholder")});
}); });
$('.autofocus').focus();
$('*[title]').popup(); $('*[title]').popup();
}
document.addEventListener('DOMContentLoaded', function() {
$('.autofocus').focus();
onDomChanges();
}); });
document.addEventListener('htmx:load', onDomChanges);