</ head>
</ body>
<!-- DYNAMIC WEEKDAY -->
<script>
// for each .weekday element
document.querySelectorAll('.weekday').forEach(weekday => {
// get today's day
const today = new Intl.DateTimeFormat('en', {weekday:'long'}).format(new Date());
// set it as the current text
weekday.textContent = today;
});
</script>
HTML/Embed
Only tabs with a " " have code.
<!-- DYNAMIC WEEKDAY -->
<script>
// for each .weekday element
document.querySelectorAll('.weekday').forEach(weekday => {
// get today's day
const today = new Intl.DateTimeFormat('en', {weekday:'long'}).format(new Date());
// set it as the current text
weekday.textContent = today;
});
</script>
Only tabs with a " " have code.
Only tabs with a " " have code.
Only tabs with a " " have code.
If you have already pasted this code into your project then you can skip this. If you haven't, and it's your first time using CodeCrumbs, then copy this code and navigate to your sites global settings > Custom Code tab > paste it into the <head> (first custom code block). It just needs to exist once.
How to use:
Tutorial Coming Soon!
Check Browser Support
Interactive Table
More related crumbs..
Want to contribute to the community?
Tell us what code you're working with. We would love to see it and possibly add it to the library.