Skip to content
Advertisement

Tag: backbone.js

Backbone and jQuery events

I have a simple task – retrieve click listener function from DOM element. I’ve fased two problems: I have no idea how to obtain event listener, that was set via addEventListener function $(element).data(‘events’) is always empty Talking about first problem – I think it’s not critical as I’m using this function only in one place. But the second problem is

In Javascript, what does this underscore mean?

I’m reading a tutorial on backbone.js here: http://addyosmani.com/blog/building-spas-jquerys-best-friends/ What are the underscores? (_index, _photos, _album) Why use them? Answer It means private fields or private methods. Methods that are only for internal use. They should not be invoked outside of the class. Private fields contain data for internal use. They should not be read or written into (directly) from outside

Backbone View events not firing

I am using Rails3 as my backend and Jammit to asset… Now I am trying to not compress and even package the assets. The simple event don’t get run, but the alert(‘asd’) int initialize is working as expected. I have already tried other kinds of events in other objects too, but it didn’t work. My code as follow: and my

What is the purpose of backbone.js?

I tried to understand the utility of backbone.js from its site http://documentcloud.github.com/backbone, but I still couldn’t figure out much. Can anybody help me by explaining how it works and how could it be helpful in writing better JavaScript? Answer Backbone.js is basically an uber-light framework that allows you to structure your Javascript code in an MVC (Model, View, Controller) fashion

Advertisement