Created
August 28, 2013 21:43
-
-
Save erikfloresq/6371723 to your computer and use it in GitHub Desktop.
Estrutura para modulo js
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 Example = (function($){ | |
var st = { | |
'link' : '#example' | |
}, | |
dom = {}, | |
catchDom = function(){ | |
dom.link = $(st.link); | |
}, | |
bindEvent = function(){ | |
dom.link.on('click',fnExample); | |
}, | |
fnExample = function(){ | |
}, | |
init = function(){ | |
catchDom(); | |
bindEvent(); | |
}; | |
return { | |
init : init | |
}; | |
})(jQuery); | |
$(function(){ | |
Example.init(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment