You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
421 B
JavaScript
19 lines
421 B
JavaScript
12 years ago
|
var templates = {};
|
||
|
|
||
|
function loadTemplates(templatesToLoad) {
|
||
|
var timestamp = new Date().getTime();
|
||
|
|
||
|
for (var t in templatesToLoad) {
|
||
|
(function(template) {
|
||
|
$.get('templates/' + template + '.tpl?v=' + timestamp, function(html) {
|
||
|
templates[template] = html;
|
||
|
});
|
||
|
}(templatesToLoad[t]));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function templates_init() {
|
||
|
loadTemplates(['register', 'home', 'login']);
|
||
|
}
|
||
|
|
||
|
templates_init();
|