Sorting collections with Backbone.js and jQuery Mobile
In a previous post, I provided a simple example of rendering an HTML list view using Backbone.js and jQuery Mobile. The code from that example ended up rendering a list like this: Notice that the list is presented in the order that came from the JSON. Also, when items are added to the list, they show up at the bottom. While easy, this isn’t the best. In this post, I’ll add sorting to the backbone collection and make a small…