Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function loadTemplate(path, callback) {
- var source, template;
- $.ajax({
- url: path,
- success: function (data) {
- source = data;
- template = Handlebars.compile(source);
- if (callback && typeof callback === 'function') {
- callback(template);
- }
- }
- });
- };
- loadTemplate('script/templateTask.html', function (template) {
- $(".one").html(template);
- });
Add Comment
Please, Sign In to add comment