Category Archives: jQuery

Rewriting My ‘Guaranteed Callbacks’ Code With jQuery Deferred

In a previous post, I showed some code that I wrote to guarantee the execution of a callback method after a Backbone collection was loaded. Even if you added the callback after the collection had been loaded, it would run. Shortly … Continue reading 

| 4 Comments

Don’t Rely Solely On jQuery’s “keyup” Event

A few days ago I pushed some changes to the form validation up to my WatchMeCode website. I was trying to fix a scenario where a browser cache would have some of the data in the purchase form already filled … Continue reading 

| 6 Comments

Backbone.js: Object Literals, Views Events, jQuery, and `el`

I’ve seen this question in various forms on StackOverflow, more than a few times: Why aren’t my view event callbacks are being fired? or My view events won’t fire. What am I doing wrong? or My view’s `el` is empty? … Continue reading 

| 18 Comments

Coordinating multiple ajax requests with jquery.when

While building a rich JavaScript application, you may get in a situation where you need to make multiple ajax requests, and it doesn’t make sense to work with the results until after all of them have returned. For example, suppose … Continue reading 

| 10 Comments

Test-Driving Backbone Views With JQuery Templates, The Jasmine Gem, and Jasmine-JQuery

In my current production rails app, I use Cucumber to test my backbone code as an integration test – to make sure that the entire system is playing nice. Over the weekend, I decided to dive a little deeper into my … Continue reading 

| 8 Comments

A Simple Example For Backbone.ModelBinding

I received a question via Github, asking if I had any simple, functional examples of my Backbone.ModelBinding plugin. After looking back through my blog posts and the documentation for it, I realized I did not. So, I whipped one up … Continue reading 

| 9 Comments

Run QUnit tests under Continuous Integration with NQUnit

Almost three years ago, I wrote about Running jQuery QUnit tests under Continuous Integration. As you can imagine, a lot has changed in three years. You would now have a lot of trouble following my post if you use the … Continue reading 

| Leave a comment

Testing Out Embedding Of JSFiddle

This is mostly just a test to see if I can get a JSFiddle embedded into my blog post. The fiddle is a small backbone app that I’ve been playing with, to try out some different architectural ideas. It’s nothing … Continue reading 

| 10 Comments

Stop Using Backbone As If It Were A Stateless Web Server

In the web development world with MVC based back-end servers, nearly everything is kicked off with routes. Look at rails for example. If you want a list of items, you hit /items and the router executes the index method on … Continue reading 

| 27 Comments

Awesome Model Binding For Backbone.js

A few weeks ago, Brandon Satrom introduced me to Knockout.js by pointing me to a video by Steve Sanderson. I haven’t had a chance to try KO, yet, but I have to say I was blown away by the data-binding … Continue reading 

| 16 Comments