I met a small problem that an outside 'example' object does not be got
in a 'click' function.
would you tell me how to do that?

==
example code:
==

var Example = function(){};
Example.prototype = {

  i_want_to_call_this_function: function(){
    alert('Hi!');
  },

  execute: function(){
    $('#any_button').click(function(){

      // How to call 'i_want_to_call_this_function' from here?

      // this.i_want_to_call_this_function(); // -> Unknown. i know a
'this' object pointed to html object.

    });
  }
};

var example = new Example();
example.execute();

Reply via email to