Loop 1.1

A Utility Class. Its methods can be implemented with Class-implement into any Class. Used to run a class method on a periodical.

Useful in galleries, slideshows, tickers, sprite animations, pulsing, logout scripts, etc. Anything that needs to run the same function repeatedly.



Details

Author
Ryan Florence
Current version
1.1
GitHub
rpflorence/Loop
Downloads
5151
Category
Utilities
Tags
Report
GitHub Issues

Releases


Dependencies

  • core:1.2.4/'*'/core: 1.2.4

How to use

Example:

var Widget = new Class({

  Implements: Loop,

  initialize: function(log){
    this.setLoop(this.update, 1000);
    this.log = document.id(log);
  },

  update: function(count){
    this.log.set('text',"Looped " + count + " times");
  }

});

var myWidget = new Widget('log').startLoop();

View the MooDoc for usage and examples.


Change Log

  • 2009-01-01 - setLoop now starts the loop again if it was already looping when setLoop was called.

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