Can anyone axplain why the first thing works and the second dont?
function MyObj(val) {
this.value = val;
this.myFunc = function(selector) {
$(selector).html("test: " + this.value);
}
}
foo = new MyObj("tester");
foo.myFunc("#one"); //This works
func = foo.myFunc;
func("#two"); //This doesnt
How? and how can i make it work?