Refactor show respondents buttons for improved readability and maintainability
This commit is contained in:
@@ -63,7 +63,7 @@
|
|||||||
// Fallback for environments where HTMX isn't active or the hx-* attributes don't trigger.
|
// Fallback for environments where HTMX isn't active or the hx-* attributes don't trigger.
|
||||||
// Attach a click handler to buttons with class .show-respondents-btn that will fetch
|
// Attach a click handler to buttons with class .show-respondents-btn that will fetch
|
||||||
// the fragment URL (from data-url) and replace the container content.
|
// the fragment URL (from data-url) and replace the container content.
|
||||||
(function(){
|
(function(){
|
||||||
try {
|
try {
|
||||||
var els = document.querySelectorAll('.show-respondents-btn');
|
var els = document.querySelectorAll('.show-respondents-btn');
|
||||||
els.forEach(function(btn){
|
els.forEach(function(btn){
|
||||||
@@ -86,5 +86,5 @@
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user