adamant-exabyte-92636
01/05/2022, 1:25 PMon click hide #target with slide
fresh-controller-36545
01/05/2022, 1:25 PMfresh-controller-36545
01/05/2022, 1:25 PMfresh-controller-36545
01/05/2022, 1:26 PMadamant-exabyte-92636
01/05/2022, 1:30 PMfresh-controller-36545
01/05/2022, 1:31 PMadamant-exabyte-92636
01/05/2022, 1:34 PMfresh-controller-36545
01/05/2022, 1:40 PMfresh-controller-36545
01/05/2022, 1:41 PMadamant-exabyte-92636
01/05/2022, 1:43 PMadamant-exabyte-92636
01/05/2022, 1:45 PMfresh-controller-36545
01/05/2022, 1:47 PMhx-action
back. Even though this obviously relies on a JavaScript function being defined in a JS file somewhere, which seems to be the whole gist of what hyperscript is about - eliminating JS-based functions for small interactivity - if I understand it correctly thenadamant-exabyte-92636
01/05/2022, 1:47 PMfresh-controller-36545
01/05/2022, 1:47 PMjavascript
document.addEventListener('htmx:afterOnLoad', function(evt){
var fnstring = evt.detail.elt.getAttribute('hx-action');
if (typeof fnstring === 'undefined' || fnstring === null) return
return Function('"use strict";return (' + fnstring + ')')();
var fn = window[fnstring];
if (typeof fn === "function") fn();
});
adamant-exabyte-92636
01/05/2022, 1:50 PM<button _="on htmx:afterOnload doSomethingInANormalJSFunction()">
fresh-controller-36545
01/05/2022, 1:51 PMdraggable
changes @User came up with sent/synchronized to the backend? Assume it's something like simple table with ordered elements ... or if we want to be super advanced - Trello.adamant-exabyte-92636
01/05/2022, 1:55 PMadamant-exabyte-92636
01/05/2022, 1:56 PMadamant-exabyte-92636
01/05/2022, 1:57 PMic-action
attribute... then I'd defintely replace that with hyperscript insteadadamant-exabyte-92636
01/05/2022, 2:01 PMfresh-controller-36545
01/05/2022, 2:04 PMhx-trigger
, hx-get
, hx-post
, hx-indicator
, hx-target
, hx-swap
, hx-swap-oob
, hx-boost
and hx-confirm
πfresh-controller-36545
01/05/2022, 2:05 PMhx-val
seems like a slippery slope into rebuilding an AJAX endpoint πadamant-exabyte-92636
01/05/2022, 2:05 PMhx-vals
is definitely only necessary when you're doing something a bit specialadamant-exabyte-92636
01/05/2022, 2:06 PMfresh-controller-36545
01/05/2022, 2:06 PMadamant-exabyte-92636
01/05/2022, 2:07 PMfresh-controller-36545
01/05/2022, 2:10 PMadamant-exabyte-92636
01/05/2022, 2:11 PMgorgeous-ghost-95789
01/05/2022, 2:58 PM