Skip to content

Instantly share code, notes, and snippets.

@jamesnotjim
Created April 20, 2018 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesnotjim/fafa5c21852dc46945b21590b4db5579 to your computer and use it in GitHub Desktop.
Save jamesnotjim/fafa5c21852dc46945b21590b4db5579 to your computer and use it in GitHub Desktop.
Dynamic Copyright Date Example
<!-- include these in the head -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
$( document ).ready(function() {
var copyrightYear = (new Date()).getFullYear();
var copyrightVerbiage = "Tyrell Corporation. Trademarks and registered trademarks are owned by Tyrell Corporation or its subsidiaries.";
element = document.getElementById("Copyright");
element.innerHTML = "&copy;" + copyrightYear + " " + copyrightVerbiage;
});
</script>
<!-- include this in the body, wherever you want the copyright statement to appear -->
<span id="Copyright"></span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment