I've been at this for months, and still can't figure it out. I have a playlist of 365 videos that I'd like to link with each day of the year to display on my site for the kids in my program to be inspired by. Here's what I have so far:
I must add the dates using "moments": Adding Days using Moment.JS
Someone suggested that I use the following script, but I couldn't figure out how to implement it whatsoever:
var today = new Date();
var dd = String(today.getDate()).padStart(2, '0');
var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
var yyyy = today.getFullYear();
today = mm + '/' + dd + '/' + yyyy;
if(today == "07/07/2022"){
$("iframe").attr('src','https://www.youtube.com/embed/z7plt65m0Ts');
}else if(today == "08/29/21"){
$("iframe").attr('src','some another video url');
}else if(today == "08/30/21"){
$("iframe").attr('src','some another video url');
}
And I've found a page that shows me how to show/hide divs during certain spans of a year, but I don't know how to spread it out to impact each and every day: Show/Hide divs based on date
Thank you for any help you're able to provide.