How to add Javascript code

1 reply · opened Sep 11, 2017

LleanovskiSep 11, 2017

Hi

Firstly thanks for a great template - I am becoming more impressed with it as I gain confidence using the Canvas template.

I wish to add JavaScript code to automatically update the copyright date each year.

<script>new Date().getFullYear()>1998&&document.write("-"+new Date().getFullYear());</script>

The script works when I insert it in the Copyrights section of the page. I want to make sure I am not creating an unknown problem by inserting the script code in the Copyrights section.

Do you have instructions on properly handling additional scripts?

SSemicolon WebSTAFFSep 18, 2017

Hello,

Thank You so much for the Kind Words! :) We truly appreciate this!

The Code you are using is completely fine and will not cause any issues on the Page. However, if you are planning to add any extra JS Plugins or jQuery related codes on the Page, it should always be done after the js/functions.js JS File Linking.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard