Category Archives: jQuery

Rendering a view after multiple async functions return (using promises)

In the last post, we saw how to use jQuery’s promises to render a view once data had been returned from an asynchronous function. Let’s take the concept a little further and see how we could render the view only … Continue reading

Posted in AJAX, Backbone.js, Backbone.Marionette, jQuery | 2 Comments

Using jQuery promises to render Backbone views after fetching data

So I’ve been working through Brian Mann’s Marionette screencasts at Backbonerails.com. They’re absolutely top notch material, and I can’t recommend them enough. So if you want to learn how to go about building large Backbone applications (even if the back … Continue reading

Posted in AJAX, Backbone.js, Backbone.Marionette, jQuery | 2 Comments

Posting forms with AJAX on checkbox toggle

In a recent Rails 3.1 project, I wanted to have some values updated via AJAX when a checkbox value is checked or unchecked. As I was unable to find anything on the subject online, I figured I would document it … Continue reading

Posted in AJAX, CoffeeScript, jQuery, Rails | Comments Off

First encounter with the Rails asset pipeline and Coffeescript

I was working on a Rails 3.1 project, and wanted to have some javascript image preview functionality (much like this) in several places within the project. Since this project used the new Rails 3.1, I decided I’d do my best … Continue reading

Posted in CoffeeScript, jQuery, Rails | 2 Comments

Consuming a public Rails API with jQuery

A previous post explained how to implement a public API in Rails. Here, we will cover how this API can be consumed with a cross-domain request using jQuery. The idea We’ll create a simple html file containing <ul> elements with … Continue reading

Posted in AJAX, jQuery | 4 Comments