# getwid/2.1.2/assets/blocks/countdown/frontend.js

Getwid – Gutenberg Blocks, version 2.1.2. 4 lines.

- Page: https://pluginprobe.com/plugins/getwid/2.1.2/code/assets/blocks/countdown/frontend.js
- Raw: https://pluginprobe.com/plugins/getwid/2.1.2/raw/assets/blocks/countdown/frontend.js
- Modified: 2022-05-02T14:55:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/getwid/2.1.2/code/assets/blocks/countdown/frontend.js#L10-L20`.

```javascript
!function(t){function n(e){if(o[e])return o[e].exports;var a=o[e]={i:e,l:!1,exports:{}};return t[e].call(a.exports,a,a.exports,n),a.l=!0,a.exports}var o={};n.m=t,n.c=o,n.d=function(t,o,e){n.o(t,o)||Object.defineProperty(t,o,{configurable:!1,enumerable:!0,get:e})},n.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(o,"a",o),o},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=10)}({10:function(t,n){/*!
 * getwid-countdown
 */
!function(t){t(document).ready(function(n){t(document.body).on("post-load",function(t){o()});var o=function(){t(".wp-block-getwid-countdown:not(.getwid-init)").each(function(n,o){t(this).addClass("getwid-init");var e=jQuery(o).find(".wp-block-getwid-countdown__content"),a=e.data("datetime"),r=e.data("years"),c=e.data("months"),u=e.data("weeks"),d=e.data("days"),i=e.data("hours"),s=e.data("minutes"),f=e.data("seconds"),l=e.data("bg-color"),p="negative"==a?"":a,w="";r&&(w+="Y"),c&&(w+="O"),u&&(w+="W"),d&&(w+="D"),i&&(w+="H"),s&&(w+="M"),f&&(w+="S"),e.countdown({until:p,format:w,onTick:function(t){var n=jQuery(".countdown-section",e);l&&n.css("background-color",l)}})})};o()})}(jQuery)}});
```
