Started

Selectors

Utilities

Animation

AJAX

CSS

Event

Manipulation

Cookie

String

Attributes

Data

Storage

Miscellaneous

$clear

Clear timeout and interval timer to stop thier function.
$clear( timer )
  1. timer [timer]
    The timer from setTimeout or setInterval.

Notes

This function will work on both timer from setTimeout or setInterval.

Example

HTML code
<div id="box"></div>
<button onclick="start_clear()">Stop timer</button>
JavaScript code
var timer = setInterval( function ()
{
	var date = new Date();

	$html($("box"), date);
}, 1000);

function start_clear()
{
	$clear(timer);
}
Demonstration