Browse Source

Disable body adding class name

Volodymyr Tkach 2 years ago
parent
commit
f83845eb21
1 changed files with 6 additions and 6 deletions
  1. 6 6
      js/ajax.js

+ 6 - 6
js/ajax.js

@@ -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'); };
 			});
 		};
 	};