0
var init = function( selector ){

        this.element = $(selector);

        var foo = function(){
            console.log(this.element);  
        };

        foo();
};

I have a inner function try to access property this.element, but it couldn't find it.

why couldn't access closure, anyone know where is the problem?

Benjamin W
  • 2,658
  • 7
  • 26
  • 48

0 Answers0