Created
November 9, 2015 21:31
-
-
Save eresende/e07ae7be4bce38f72141 to your computer and use it in GitHub Desktop.
How to create a new javascript object to deal with forms.
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 Forms = (function(Forms) { | |
Forms.requestDemo = { | |
init: function(){ | |
var self = Forms.requestDemo; | |
console.log('initalize stuff'); | |
self._initFormFields(); | |
self._initFormValidators(); | |
self._initSubmit(); | |
}, | |
_initFormFields: function() { | |
console.log('init form fields here'); | |
}, | |
_initFormValidators: function() { | |
console.log('init validators here'); | |
}, | |
_initSubmit: function() { | |
console.log('init submit here'); | |
} | |
}; | |
return Forms; | |
})(Forms || {}); | |
$(function() { | |
Forms.requestDemo.init(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment