Keeping the copyright year up to date is a simple bit of code but what is actually happening? We break down the JavaScript line-by-line in Webflow to understand this.
You Might Not Need jQuery: http://youmightnotneedjquery.com/
IIFE Explanation: https://stackoverflow.com/questions/2...
jQuery Documentation: https://api.jquery.com/
Webflow (Affiliate Link): https://bit.ly/2ZzlJnd
(function($) {
var todaysYear = new Date().getFullYear()
var $dateEl = $('.year')
$dateEl.text(todaysYear)
})(jQuery)
Intro: (0:00)
The Setup: (1:04)
My Stance on jQuery/JavaScript: (1:56)
What is an IIFE: (5:57)
Where to Load JavaScript: (6:50)
JavaScript in the Browser: (7:13)
Getting Elements with jQuery: (8:49)
Changing Text with jQuery: (10:54)
jQuery Documentation: (11:37)
Var, Let, Const: (14:53)
Getting the Current Year: (17:52)
Putting it All Together: (20:33)
Recap: (22:08)
Outro: (24:53)
-
Get to know me!
Instagram: @fakesamgregory
X: https://x.com/@0x5am5
-
#Webflow #JavaScript #jQuery
Watch video Always Display Current Year in Webflow (JavaScript Vs jQuery) online without registration, duration hours minute second in high quality. This video was added by user Samuel Gregory (0x5am5) 29 June 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,542 once and liked it 65 people.