Working with the JavaScript one of the confusing thing is when using this
this
var x = { ele : \'test\', init : function(){ alert(this.ele)
To me, it helped a lot the following guideline: every time you see this think owner. The object who owns the variable name to which the function is assigned will become the this. If you cannot make sense to who owns it, then this will be window.
owner