Skip to content

Instantly share code, notes, and snippets.

@pathsny
Created July 31, 2010 07:27
Show Gist options
  • Save pathsny/501891 to your computer and use it in GitHub Desktop.
Save pathsny/501891 to your computer and use it in GitHub Desktop.
function loadTemplates(fn){
var templates - ['action', 'error', 'torrent', 'no_torrents', 'speed'];
templates.reduce(function(acc_fn, template){
return function() {
$.get('templates/' + template + '.html.template',
function(data){
$templates[template] = $.jqotec(data);
acc_fn();
}
)
}
}, acc_fn)();
}
@pathsny
Copy link
Author

pathsny commented Jul 31, 2010

loading a bunch of templates into the jqote engine before proceeding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment