shot of post - ๐Ÿ’ญ </> htmx ~ Locality of Behaviour (LoB)

Here's my thought on ๐Ÿ’ญ </> htmx ~ Locality of Behaviour (LoB)


Interesting principle here. What a great example, If I'm looking at the second jQuery example, I have to dig into dev tools or make some assumtions that this team uses jQuery, and selects by id, therefore I can grep for $("#d1").

Consider two different implementations of an AJAX request in HTML, the first in htmx:

<button hx-get="/clicked">Click Me</button>

> and the second in jQuery:


  $(&quot;#d1&quot;).on(&quot;click&quot;, function(){
    $.ajax({
         /* AJAX options... */
    });
  });
</code></pre>
<pre><code class="language-html">&lt;button id=&quot;d1&quot;&gt;Click Me&lt;/button&gt;
</code></pre>
<hr />
<p>!!! note
This post is a <a href="https://thoughts.waylonwalker.com">thought</a>.  It's a short note that I make about someone else's
content online.  Learn more about the process [[ thoughts ]]</p>
<p>{.text-opacity-80}
This post was a thought by <a href="https://waylonwalker.com">Waylon Walker</a> see all my
thoughts at
<a href="https://waylonwalker.com/thoughts">https://waylonwalker.com/thoughts</a></p>