JavaScript in the assets is not running in a custom liquid file I made

I made a custom section using html and css, html code is in a new liquid file and I imported the css file using the

{{ “filename.css” | assets_url | stylesheet_tag }} and the html and css is working just fine but I made a separate javascript file that has working code in it and when I called it in the liquid file using {{ “filename.js” | assets_url | script_tag }} the javascript is not working on the page. i have tried putting it in the {%javascript%} {%endjavascript%} but it is not working

Hello @Femmi

Its Artzen Technologies! We will be happy to help you today.

Go to the Online Store->Theme->Edit code->Assets->theme.liquid>

Paste all javascript code before tag

your javascript code under the tag

like this

Let me know if need further assistance
Regards,
Artzen Technologies

I pasted the javascript code in the theme.liquid file in between the tags but its still not working.

maybe I should explain the issue better. i wanted to make a whole new custom page for my shopify store. so I made a new liquid file in the section folders and in that file I pasted my html and then I made a new page template and added this new section using the theme editor and applied this template to a page. The html was working and it needed some styling so I made a css file in the assets folder. then I imported the css into the liquid file using the {{ “filename.css” | assets_url | stylesheet_tag}} and the css is loading now. now i wanna add some functions to this as well and I have made a filename.js file in the assets folder and tried importing this into the liquid file using the same technique I used for css file but it didn’t work. i tried putting the whole js code in the {%javascript%} and {%endjavascript%} in the liquid file itself but it didn’t work either. Please help!

having the same issue, did you ever find a solution?