From 9d459f2ff78cdb0165427bea37803ee389659d8c Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Tue, 13 Aug 2024 12:13:28 +0300 Subject: Use htmx event handler. --- gn2/wqflask/templates/gn_editor_settings.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gn2/wqflask/templates/gn_editor_settings.html') diff --git a/gn2/wqflask/templates/gn_editor_settings.html b/gn2/wqflask/templates/gn_editor_settings.html index 62ab4f6a..a87e3dc8 100644 --- a/gn2/wqflask/templates/gn_editor_settings.html +++ b/gn2/wqflask/templates/gn_editor_settings.html @@ -100,7 +100,7 @@ $('#fontSizeValue').text(fontSize); }); - document.querySelector("#settingBtn").addEventListener("click", function () { + htmx.on("#settingBtn", "click", function () { var formData = { theme: `ace/theme/${$('input[name="theme"]:checked').val()}`, fontSize: parseInt($("#fontSizeRange").val()), @@ -117,6 +117,6 @@ detail: {action: 'didInitialize', payload: formData}, }), ); - }); + }) {% endblock %} -- cgit v1.2.3