Adding Javascript to Brooklyn Theme home page

6 1 2

Hi, I've successfully added JS to custom pages but unsure how to do the same to the home page. I've added a Custom HTML block and now want to finish the functionality with some JS. Where would I add that? Not to the same Custom HTML block using script tags, right?

Shopify Expert
3535 543 843

This is an accepted solution.


If you want to add js that work on anywhere on store then add in theme.js or if you want to add just within home page then add in theme.liquid at bottom with bellow condition

{% if template contains 'index'%}
//Add Js code here
{% endif %}

Let me know if you need help. 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
1 Like