JavaScript and WordPress


Why this is working:

and when I include this file in home.php it’s broken? It’s just HTML, JavaScript not working then at all

It looks like everything on the home page is actually working fine.

It won’t work as a separate HTML file because (apart from the fact it’s not a fully formed HTML page) the required JavaScript (and maybe CSS) isn’t in that file.