86K Webflow Domain List
NEW

Set Div to Today's Date

Example

Set Div to Today's Date

Description

Dynamically add today's date to a div on your Webflow site. A perfect way to easily display the current date on your site without any headaches.

Instructions

  1. Add the Javascript code to your sites body closing custom code section
  2. Set the target div's element ID with output

Javascript snippet


<!-- Add to closing body section -->
<!-- Current date script -->
<script>
var today = new Date();

var day = today.getDate();
var month = today.getMonth() + 1;
var year = today.getFullYear();

if (day < 10) {
  day = '0' + day
}
if (month < 10) {
  month = '0' + month
}

var out = document.getElementById("output");

out.innerHTML = month + "/" + day + "/" + year;

</script>

<!-- Customize the date output -->
<script>
var today = new Date();
    var day = today.getDate();
    var day1 = today.getDate() + 1;
    var day2 = today.getDate() + 2;
    var month = today.getMonth() + 1;
    var year = today.getFullYear();

    var months = new Array(12);
    months[0] = "January";
    months[1] = "February";
    months[2] = "March";
    months[3] = "April";
    months[4] = "May";
    months[5] = "June";
    months[6] = "July";
    months[7] = "August";
    months[8] = "September";
    months[9] = "October";
    months[10] = "November";
    months[11] = "December";

    var out = document.getElementById("milestone1");
    out.innerHTML = month + "/" + day + "/" + year;

    var out = document.getElementById("milestone2");
    out.innerHTML = month + "/" + day + "/" + year;

    var out = document.getElementById("milestone3");
    out.innerHTML = month + "/" + day1 + "/" + year;

    var out = document.getElementById("milestone4");
    out.innerHTML = month + "/" + day1 + "/" + year;

    var out = document.getElementById("milestone5");
    out.innerHTML = month + "/" + day2 + "/" + year;

    var out = document.getElementById("milestone6");
    out.innerHTML = month + "/" + day2 + "/" + year;

    var out = document.getElementById("milestone3m");
    out.innerHTML = months[month] + " " + day1;

    var out = document.getElementById("milestone6m");
    out.innerHTML = months[month] + " " + day2;
</script>

CSS snippet

HTML snippet

Countdown timer

Countdown timer

Add a countdown timer to your Webflow site with this simple Javascript snippet. Want to display a countdown timer to a time of your choosing on your Webflow site? Now you can easily add one with this Javascript snippet.

Reading Time Blog/Article Page

Reading Time Blog/Article Page

Display the reading time associated with a blog or article on your Webflow site with this Javascript code. With this code you'll be able to easily add a reading time to all of your blogs or articles on your Webflow site.

Show/Hide Based on Date or Time

Show/Hide Based on Date or Time

This allows you to show or hide items based on date or time in Webflow. This is great for event based information, you can display various elements based on if its prior to a time or after a specified time on your Webflow site.

Set hidden input form value from URL parameters

Set hidden input form value from URL parameters

Set hidden form input values from URL parameters on your Webflow site. This Javascript code allows you to utilize Webflow's native form input and add hidden values based on URL parameters. This is great for paid advertising campaigns, internal link tracking and a variety of other options.

Automatically Apply Coupon Code

Automatically Apply Coupon Code

3

Automatically apply a coupon code during checkout on your Webflow Memberstack website.

Set referring URL as hidden input

Set referring URL as hidden input

A method to pass the referring domain/URL as a hidden field in a form in Webflow. This is perfect to know who referred the person submitted the form, or a way to display the referring domain on the page on your Webflow site.

Set URL from Tab Change

Set URL from Tab Change

Link to specific tabs using URL parameters by setting tab URLs in Webflow. This script allows you to set the tab name in the elements panel for the tabs that you want the URL to include for each tab. The URL will use the # parameter, for example something like example.com#tabName where tabName is the element ID you set on the tab. This allows you to link to specific tabs from other pages and have more control over the tab experience.

Page Transition Click Delay

Page Transition Click Delay

Add a delay when a user clicks on a link on your Webflow site. This functionality adds a nice delay to your Webflow site before the users hit the next page.

DRAG
Real-time sorting by
Hide/show Items based on URL Parameter

Hide/show Items based on URL Parameter

Show or hide divs or elements based on the parameter within a URL in Webflow. This Javascript code allows you to make your Webflow site even more dynamic by allowing you to customize elements on the page based on the URL parameter provided.

Infinite CSS Marquee/Ticker Logo

Infinite CSS Marquee/Ticker Logo

An easy way to utilize CSS for Logo marquees and other sections in your Webflow site. An easier way to create an infinite looping marquee on your Webflow site than creating them manually with Webflow interactions.

Count Up Numbers on Page Scroll

Count Up Numbers on Page Scroll

When scrolling down the page numbers count up as they enter browser view via this Javascript snippet on your Webflow site. An easy way to add number count up to your Webflow site.

Prevent Input Zoom Scaling on Mobile

Prevent Input Zoom Scaling on Mobile

Prevent an input form zoom scaling on mobile on your Webflow site. This allows for a better user experience based on your sites design rather than mobile OS zoom default properties.

Bulk Delete 301 Redirects from Webflow Settings

Bulk Delete 301 Redirects from Webflow Settings

A simple way of bulk deleting 301 redirects from within Webflow's Hosting settings. This makes updating, cleaning up, removing 301's redirect a breeze rather than a labor intensive process.

Single Line Truncate Text

Single Line Truncate Text

Automatically truncate text that goes beyond a line on your Webflow site with this simple CSS script. This helps create uniformed design on your site by truncating text with ellipsis if they go beyond a single line.

Fix Finsweet CSS Styling Issues

Fix Finsweet CSS Styling Issues

This is used to normalize and reset any CSS used in the client-first system to correct any strange Webflow native issues as well as offer some additional functionality like truncating via CSS. This should be added to your global styles embed on your site.

Reload Page after Form Submit

Reload Page after Form Submit

Automatically refresh your Webflow site's page after a form submit with this Javascript snippet. A great way of indicating that a form has been submitted to a user or refreshing the page for another submission.

DRAG
Real-time sorting by