view js function window VIEW window VIEW window VIEW showMyButton func

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
// view.js
(function () {
window.VIEW = window.VIEW || {};
window.VIEW.showMyButton = function () { document.getElementById('my-button').style = 'display: block';
// ...
})();
// view-signin.js
(function () {
window.VIEW = window.VIEW || {};
window.VIEW.showSignInForm = function () { document.getElementById('my-signin-form').style = 'display: block';
// ...
})();
// signin.js
(function () {
window.VIEW.showMyButton();
window.VIEW.showSignInForm();
})();