-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsite.js
43 lines (39 loc) · 890 Bytes
/
site.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
* Site JavaScript template.
* ------------------------------------------------------------------------
*/
var Site = (function(window, document) {
"use strict";
var site = {
init: function() {
}
/* Add your site methods here */
};
/**
* Return public methods that you want other objects to be able to access
*/
return {
init: function() {
site.init.call(site);
}
};
})(window, document);
/**
* Bind initialize methods
* ------------------------------------------------------------------------
*/
(function(window, document, siteObject){
if(window.jQuery || window.Zepto) {
$(document).ready(function() {
siteObject.init();
});
} else if ("addEventListener" in window) {
window.addEventListener("load", function() {
siteObject.init();
});
} else {
window.onload = function() {
siteObject.init();
};
}
})(window, document, Site);