Note

This post is a thought. It's a short note that I make about someone else's content online. Learn more about the process thoughts

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:

``` js
  $("#d1").on("click", function(){
    $.ajax({
         /* AJAX options... */
    });
  });

<button id="d1">Click Me</button>

This post was a thought by Waylon Walker see all my thoughts at https://waylonwalker.com/thoughts