FlipClock.js 0.8.0 Beta

Event Reference

Overview

The event reference lists all the events that are triggered by the objects in FlipClock.js.


FlipClock.Factory

  • init
    Triggers when the factory has initialized
  • load:face
    Triggers when the clock face is loaded

clock.on('init' function() {
	// Do something
});

FlipClock.Face

  • auto:increment
    Triggers when the autoIncrement() method is called.
  • add:digit
    Triggers when a new digit is added to the clock.
  • before:start
    Triggers before the clock is been started but after the start() method was called.
  • before:stop
    Triggers before the clock is been stopped but after the stop() method was called.
  • build
    Triggers when the clock face is been built.
  • create:divider
    Triggers when a new divider is created.
  • create:list
    Triggers when a new FlipClock.List is created.
  • decrement
    Triggers when the clock face is decremented.
  • flip
    Triggers when the clock face is flipped.
  • increment
    Triggers when the clock face is incremented.
  • init
    Triggers when the clock face is initialized.
  • interval
    Triggers when the clock’s timer changes.
  • reset
    Triggers when the clock face is reset.
  • start
    Triggers when the clock face is started.
  • stop
    Triggers when the clock face is stopped.
  • set:countdown
    Triggers when the clock face countdown is set.
  • set:time
    Triggers when the clock face time is set.
  • set:value
    Triggers when the clock face value is set.

clock.face.on('start' function() {
	// Do something
});

FlipClock.List

  • create:item
    Triggers when a item is created for the list.
  • create:list
    Triggers when the list items are created.
  • init
    Triggers when the list is initialized.
  • select
    Triggers when the list is selects a new value.

for(var i in clock.face.lists) {
	var list = clock.face.lists[i];

	list.on('select', function() {
		// Do something
	});
}

Usually FlipClock.List events are bound by the clock faces themselves for internal use. But should you need to bind events to the lists after the clock has been initialized, you can do so by interating through the array.


FlipClock.Timer

  • destroy
    Triggers when the timer is destroyed.
  • init
    Triggers when the timer is initialized.
  • interval
    Triggers each time the timer changes.
  • reset
    Triggers when the timer is reset.
  • start
    Triggers when the timer is started.
  • stop
    Triggers when the timer is stopped.

clock.timer.on('start' function() {
	// Do something
});