let dumb = document.getElementsByClassName("dumb");
dumb.textContent = "SOME OTHER DUMB STUFF"
When I compile my app the above code is compiled in in. priv/static/assets/app.js
The code does not effect the text - but it is compiled to priv/static/assets/app.js
When my JS code is run outside of the phoenix app it works fine.
Related: What is the proper way to reference CSS libraries that have JS files in Phoenix?
Can you show the full file? Is this code being run at the appropriate time?
Are You using liveview? Do You know about phx-update?
If You don’t see changes, perhaps You might debug with console.log()?
I attached a screenshot.
The class I am selecting is in
I have tried applying the code to different templates and it does not affect the render.
That is strange. I would check if the app.js is well referenced in the layout, otherwise I have no idea why…
I would compare your root layout to a new generated phoenix project. I think somehow the link to the assets got deleted.