Skip to content

Commit

Permalink
Add some info about clearInterval
Browse files Browse the repository at this point in the history
  • Loading branch information
Arian committed May 9, 2010
1 parent b012fe9 commit dcf2ed2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Docs/Types/Function.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,14 @@ Executes a function in the specified intervals of time. Periodic execution can b
var Site = { counter: 0 };
var addCount = function(){ this.counter++; };
addCount.periodical(1000, Site); //Will add the number of seconds at the Site.


// The interval can be stopped using the clearInterval function
var timer = myFunction.periodical(1000);
clearInterval(timer);

### See Also:

- [$clear][], [MDC setInterval][]
- [MDC setInterval][], [MDC clearInterval][]



Expand All @@ -349,6 +352,7 @@ Executes a function in the specified intervals of time. Periodic execution can b
[MDC Function]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function
[MDC setInterval]: https://developer.mozilla.org/en/DOM/window.setInterval
[MDC setTimeout]: https://developer.mozilla.org/en/DOM/window.setTimeout
[MDC clearInterval]: https://developer.mozilla.org/en/DOM/window.clearInterval
[MDC clearTimeout]: https://developer.mozilla.org/en/DOM/window.clearTimeout
[Function:delay]: /core/Types/Function/#delay
[Function:periodical]: /core/Types/Function/#periodical
Expand Down

0 comments on commit dcf2ed2

Please sign in to comment.