top | item 31956048

(no title)

gimme_treefiddy | 3 years ago

One of the things that I found lacking, was doing like general computing-esque business intelligence tasks in htmx. For example, how would you set src on image tag upon a click. Ended up having to use jquery.

discuss

order

MonadicSystems|3 years ago

You should be able to do this with hyperscript.

    <img src="my_cat.jpg" alt="My cat" _="on click set @src to 'my_other_cat.jpg'">

mattlondon|3 years ago

I am not sure what the benefit of hyperscript would be here? Why not just use JavaScript + htmx?

ngcc_hk|3 years ago

Any more full example? Interested.