Skip to content

Instantly share code, notes, and snippets.

@glennyboy glennyboy/jQuery Current Year Secret
Last active Feb 14, 2019

Embed
What would you like to do?
jQuery Current Year
<div>Copyright &copy; <span class="currentyear">Year</span></div>
<script>
jQuery(document).ready( function($) {
currentyear = new Date().getFullYear();
$('.currentyear').text(currentyear);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.