Mooclock 0.1

Mooclock is a Mootools plugin that shows an animated Clock.

Demo: http://stecb.github.com/mooclock/



Details

Author
Stefano Ceschi Berrini
Current version
0.1
GitHub
stecb/mooclock
Downloads
1538
Category
Widgets
Tags
Report
GitHub Issues

Releases


Dependencies

  • _self_/_current_:
    • core/1.3: '*'
    • more/1.3: 'Locale'
    • more/1.3: 'Date'

How to use

Import the plugin

<script src="/Source/mooclock.js"></script>

Insert an empty div in the html

<div id="mooClock-placeholder"></div>

Set width/height of the element

#mooClock-placeholder{
  width:100px;
  height:100px;
}

Run the plugin

window.addEvent('domready',function(){
  var mooClockInstance = new Mooclock($('mooClock-placeholder'),
    /* default options 
    {
      'clockClass' : 'mooClock',
      'timeClass' : 'mooClockTime',
      style : {
        'pivot' : {
          'color' : '#FF0000',
          'width' : 10
        },
        'clockCircle' : {
          'color' : '#FF0000',
          'size' : 10
        },
        'seconds' : {
          'color' : '#000000',
          'len' : 87, //from 0 to 100
          'size' : 2
        },
        'minutes' : {
          'color' : '#000000',
          'len' : 75, //from 0 to 100
          'size' : 5
        },
        'hours' : {
          'color' : '#000000',
          'len' : 50, //from 0 to 100
          'size' : 8
        },
        'milliseconds' : {
          'color' : '#000000',
          'len' : 100, //from 0 to 100
          'size' : 1
        }
      },
      showSeconds : true,
      showHours : true,
      showMinutes : true,
      showMilliseconds : false,
      showTime : false,
      shwClockCircle : true,
      timeZoneIncrement : 0
    }
  */
  );

  //stop(pause) clock
  mooClockInstance.stop();

  //play clock
  mooClockInstance.play();
});

Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus