Created
November 22, 2013 12:46
-
-
Save yuxel/7599323 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Sahi = function () { | |
| var that = this; | |
| console.log(this); | |
| that.msg = "Burasi Class"; | |
| that.clickBindEt = function () { | |
| console.log('class this ', this); | |
| this.go = function () { | |
| console.log('go ', this); | |
| console.log(this == that); | |
| }; | |
| $("body").click(function () { | |
| console.log('icerdeki this ', this); | |
| alert(that.msg); | |
| that.go.apply(this); | |
| that.go(); | |
| }); | |
| return that; | |
| }; | |
| }; | |
| var sahi = new Sahi(); | |
| sahi.clickBindEt().go(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment