|
@@ -107,11 +107,11 @@ ajax.loadTag = function(tag, url, func) {
|
|
|
if(typeof window[func] === 'function') {
|
|
|
if(!ajax.hasClass(tag, 'loading')) {
|
|
|
ajax.addClass(tag, 'loading');
|
|
|
- var body = document.getElementsByTagName('body');
|
|
|
- if(body.length >= 1) { ajax.addClass(body[0], 'loading'); };
|
|
|
+ // var body = document.getElementsByTagName('body');
|
|
|
+ // if(body.length >= 1) { ajax.addClass(body[0], 'loading'); };
|
|
|
ajax.getJSON(url, {}, function(method, data, readyState, status, responseData) {
|
|
|
- var body = document.getElementsByTagName('body');
|
|
|
- if(body.length >= 1) { ajax.removeClass(body[0], 'loading'); };
|
|
|
+ // var body = document.getElementsByTagName('body');
|
|
|
+ // if(body.length >= 1) { ajax.removeClass(body[0], 'loading'); };
|
|
|
try {
|
|
|
var resp = window[func](tag, responseData);
|
|
|
tag.innerHTML = resp;
|
|
@@ -121,8 +121,8 @@ ajax.loadTag = function(tag, url, func) {
|
|
|
ajax.removeClass(tag, 'loading');
|
|
|
}, function(method, data, readyState, status, responseData) {
|
|
|
ajax.removeClass(tag, 'loading');
|
|
|
- var body = document.getElementsByTagName('body');
|
|
|
- if(body.length >= 1) { ajax.removeClass(body[0], 'loading'); };
|
|
|
+ // var body = document.getElementsByTagName('body');
|
|
|
+ // if(body.length >= 1) { ajax.removeClass(body[0], 'loading'); };
|
|
|
});
|
|
|
};
|
|
|
};
|