this post was submitted on 08 Jul 2024
21 points (100.0% liked)

JavaScript

2000 readers
1 users here now

founded 1 year ago
MODERATORS
 

I was watching a youtube video explaining HTMX targets and using it to pull HTML from a URL and push the HTML into a div element.

https://htmx.org/docs/#targets

This immediately reminded me of JQuery's .load() which can pull a URL and up the HTML in an element.

$( "#result" ).load( "ajax/test.html" ); https://api.jquery.com/load/

What caught me off guard is how the speaker talked about this being an entirely new technique, pulling HTML instead of JSON from an API.

It made me realize that new developers who started after the creation of ReactJS, SPA/PWA have no concept of AJAX and the interesting ways developers used to merge the client and server.

I have no interest in going back to a JQuery dominated world... or the chaos of JS development before JQuery, but it's interesting to see that what is old is new again.

top 2 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 5 points 4 months ago

Could you add a pointer to the Youtube you watched?

[โ€“] [email protected] 1 points 4 months ago

There's also Rails and Hotwire, which works like this.