var LinksView = View.extend({ el: "#links", events: { "click a": function(){ }, }, template: $("#link_template").html(), initialize: function(){ }, show: function(){ $.getJSON("/_irc/links", function(data){ data.forEach(this.append.bind(this)) }.bind(this)) }, append: function(links){ var tmpl = this.template.replace(/{{url}}/, sanitize(data.url)) .replace(/{{nick}}/, sanitize(data.nick)) this.$el.append(tmpl) }, loadMembers: function(){ this.queue.forEach(this.appendMember.bind(this)) }, })