Skip to content

Instantly share code, notes, and snippets.

@quake
Created May 17, 2011 02:39
Show Gist options
  • Save quake/975794 to your computer and use it in GitHub Desktop.
Save quake/975794 to your computer and use it in GitHub Desktop.
jscex clearInterval
<script>
var canvas = document.getElementById("clockCanvas");
var ctx = canvas.getContext ? canvas.getContext("2d") : null;
var intervalId = setInterval(function () {
drawClock(new Date());
}, 1000);
</script>
<a href="#" onclick="clearInterval(intervalId);">Stop</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment