1

I want to add a css file and a javascript file to one of my magento pages:

<reference name="head">
<action method="addCss">
<stylesheet>css/styles2.css</stylesheet>
</action>
</reference>
<action method="addJs">
    <script>js/flickity.pkgd.js</script>
</action>

this is my code. The css file is loading but the js file isn't. Is there something wrong with it and when yes, could you help me with editing the code so it should work properly? Thank you!

1 Answer 1

2

move js code into head reference

 <reference name="head">
<action method="addCss">
<stylesheet>css/styles2.css</stylesheet>
</action>
</reference>
<action method="addJs">
    <script>js/flickity.pkgd.js</script>
</action>

change to this

<reference name="head">
<action method="addCss">
<stylesheet>css/styles2.css</stylesheet>
</action>
<action method="addJs">
    <script>js/flickity.pkgd.js</script>
</action>
</reference>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.