russ666/yii2-countdown jQuery countdown widget for Yii2

widgetjquerycountdown

Installation

download

Download latest version

composer

add this line to your composer.json "russ666/yii2-countdown": "*"

Usage

echo \russ666\widgets\Countdown::widget([
    'id' => 'some-id',
    'datetime' => date('Y-m-d H:i:s O', time() + 1000),
    'format' => '\<span style=\"background: red\"\>%M</span>:%S',
    'tagName' => 'span',
    'events' => [
        'finish' => 'function(){location.reload()}',
    ],
])

Params

id

Container id.

datetime

Datetime string to countdown. Must be added with timezone, to prevent client-server timezone difference issue.

format

Datetime format for widget (http://hilios.github.io/jQuery.countdown/documentation.html#formatter)

events

Widget events (http://hilios.github.io/jQuery.countdown/documentation.html#events)

options

Container html options.

tagName

Container tag name.

Plugin pages

Homepage - http://hilios.github.io/jQuery.countdown

GitHub - https://github.com/hilios/jQuery.countdown

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

  • 0.231 May 2017
  • 0.104 March 2015

Comments



0.2 is the latest of 2 releases



MIT license
Stats
9 github stars & 4 github forks
43 downloads in the last day
829 downloads in the last 30 days
23657 total downloads