ajaxify.loadScript

v1.18.x
psychobunny 11 years ago
parent fa2b5d1ee6
commit b9264dea76

@ -86,12 +86,7 @@ var ajaxify = {};
templates.flush();
templates.load_template(function () {
require(['forum/' + tpl_url], function(script) {
if (script && script.init) {
script.init();
}
});
ajaxify.loadScript(tpl_url);
if (typeof callback === 'function') {
callback();
@ -114,6 +109,18 @@ var ajaxify = {};
return false;
};
ajaxify.loadScript = function(tpl_url, callback) {
require(['forum/' + tpl_url], function(script) {
if (script && script.init) {
script.init();
}
if (callback) {
callback();
}
});
};
ajaxify.fadeIn = function() {
$('#content, #footer').stop(true, true).removeClass('ajaxifying');
};

Loading…
Cancel
Save