Dynamically change footer copyright year
vikasganiga05 opened this issue Β· comments
Can you give more advice on how to use this piece of code and where to put it?
Can you give more advice on how to use this piece of code and where to put it?
Yeah sure, follow these steps.
Step 1 : On index.html
surround the year(2020) text in line:240 with a span
tag and Add current-year
id attribute to it.
- Copyright © 2020 YOUR NAME
+ Copyright © <span id="current-year">2020</span> YOUR NAME
Step 2 : Add the bellow code inside js/scripts.js
// Show current year
$('#current-year').text(new Date().getFullYear());
Done π If you have any queries let me know π
Thanks for the response @vikasganiga05 ! Feel free to PR this and I'd be happy to merge it.
Thanks for the response @vikasganiga05 ! Feel free to PR this and I'd be happy to merge it.
Sorry for the late reply. I like to work on this issue π
I created a PR for this issue. Please review it π π
Thanks for getting that PR up, merged!