Backbone.js

Facebook Twitter
javascript - clearTimeout on dynamically updating timer javascript - clearTimeout on dynamically updating timer I've got a timer that I'm updating dynamically. ------------------update -------------------------- when I first posted the question, I didn't think it mattered that the timer was being called from within a backbone view, but I believe as a result of that, I can't use a global variable (or at least a global variable isn't working). I'll be calling multiple timers, so setting only one global variable and deleting it won't work. I need to be able to clear a single timer without clearing the others. What I start the timer, function countDown(end_time, divid){ var tdiv = document.getElementById(divid), to; this.rewriteCounter = function(){ if (end_time >= MyApp.start_time) { tdiv.innerHTML = Math.round(end_time - MyApp.start_time); } else { alert('times up'); } }; this.rewriteCounter(); to = setInterval(this.rewriteCounter,1000); }
Building a single page app with Backbone.js, underscore.js and jQuery | &yet | the blog Building a single page app with Backbone.js, underscore.js and jQuery | &yet | the blog Overview We've been finding ourselves building more and more JS heavy apps here at &yet. Until recently, we've pretty much invented a custom app architecture for each one. Not surprisingly, we're finding ourselves solving similar problems repeatedly. On the server side, we use django to give us an MVC structure to follow.
(37) What are some good resources for Backbone.js
Unlike its web development peers, JavaScript has never really had much in the way of frameworks to provide structure. Thankfully, in recent years, that’s beginning to change. Today, I’d like to introduce you to Backbone.JS, a sweet little library that makes the process of creating complex, interactive and data driven apps so much easier. Getting Started with Backbone.js

Getting Started with Backbone.js