You are here:  » Javascript Problem


Javascript Problem

Submitted by Cav on Wed, 2015-07-22 18:28 in

Hello again.
As you can see I'm still trying to find my feet and I'm trying different things to see what works best for me. I've currently got my site up and running with no issues, however I'm trying a few tweaks. The one I'm stuck on at the moment is that I want to add some Javascript to the header of my site. The reason I choose the header was regardless of which page the end user arrived on, the javascript would deploy.
If there is a better option, I'm more than open to try, but anyway, if someone could help that would be much appreciated. I have this line to invoke the script e.g

<script type="text/javascript" src="{link saved}"></script>

, I just dont know where best to include it.
Thanks for your time.
Cav

Submitted by support on Wed, 2015-07-22 18:43

Hello Cav,

Header is just fine - I've actually moved the Foundation and jQuery .js includes into the html/header.php in the latest version of the Responsive HTML template so if you edit your file and locate the closing head tag:

  </head>

...and then insert your code on the line immediately before. Note that you can use the shorthand closure of the script tag e.g. just:

<script type="text/javascript" src="{link saved}" />

Cheers,
David.
--
PriceTapestry.com

Submitted by Cav on Wed, 2015-07-22 19:27

Awesome! Thanks for your help David. It worked a treat. Best Wishes.
Cav