HTMX not working in PHP replit?

Does HTMX work in replit? Because in mine it is not working as intended using the examples on the HTMX site. I have the htmx.min.js uploaded to my root directory and imported in the head. What am I missing?

Hi @blake18 , welcome back!
Yes, you can use HTMX in Replit. Use the official Replit template.
Hope this helps!

It doesnt seem to be possible to use php in that template. So I have to choose between php and htmx?

You can use the PHP Web Server template and manually add the HTMX script in.

Thats what I tried to do the first time, but no luck.

Could you post the URL to this Repl?

HTMX seems to be running for me in a fork:

Should’ve posted the URL first:

Really? For me its not working. Even forking your fork. It seems to be some kind of loop. Maybe it only works on paid version of replit?

That’s because there is no tab1.php/tab2.php/tab3.php file to catch the requests.

I don’t have much experience with HTMX, so no clue why it keeps looping.

What is your full code?

The tabs arent working but also it is showing double. Like the html is inserted twice.

GOT IT. Sorry my fault. I misread the htmx docs. :innocent:

Please mark your own reply as the solution.

So how did you solve the issue?

The code I was using was not meant to be all on one page. Most of it was meant to be on the /tab1 page.

And this was using your original repl?