-
-
Save dwlince/837ef87e6fd546d16e2fc69ce5f05740 to your computer and use it in GitHub Desktop.
js inicialización de Objeto
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 _class_obj = { | |
variable:'asignar valor default', | |
init: function(args) { | |
this.valueInit(); | |
this.cacheDom(); | |
this.initEvento(); | |
this.bindEvento(); | |
}, | |
valueInit: function() { | |
this.variable = valor; | |
}, | |
cacheDom: function(id) { | |
this.$ejemplo = $("#IDEjemplo"); | |
}, | |
initEvento: function() {}, | |
bindEvento: function() { | |
this.$ejemplo.on("scroll", this._onEvent_ScrollWindows.bind(this)); | |
this.$ejemplo.on("click", this._onEvent_ClickWindows.bind(this)); | |
}, | |
_onEvent_ScrollWindows:function(){}, | |
__onEvent_ClickWindows:function(){} | |
}; | |
$(document).ready(function(){ | |
_class_obj.init(args); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment