Created
October 24, 2011 03:10
-
-
Save jperrine/1308280 to your computer and use it in GitHub Desktop.
note js 2
This file contains 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 QwikObject = function (id, x, y, z) { | |
this._x = x || 0; | |
}; | |
QwikObject.prototype = { | |
get x(){ | |
return this._x; | |
}, | |
set x(x){ | |
this._x = x; | |
} | |
}; | |
QwikObject.prototype.left = function() { return this._x + 'px'; } | |
obj = new QwikObject(null, 5); | |
obj.left(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment