Created
October 21, 2016 07:14
-
-
Save kkkw/24a89ac4896bcbad3f66bbe37cf9f212 to your computer and use it in GitHub Desktop.
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
(function($){ | |
$(function(){ | |
var Page = { | |
myProp:[], | |
selector:'#foo', | |
init: function(){ | |
this.myProp = [1,2,3]; | |
this.bindFoo(); | |
return this; | |
}, | |
bindFoo:function(){ | |
$(this.selector).on('click',function(){ | |
//todo something; | |
}); | |
}, | |
render:function(){ | |
$(this.selector).trigger('click'); | |
}, | |
}; | |
Page.init().render(); | |
}); | |
}(window.jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment