Browse Source

Allow spinner to show on initial ajax requests

Nathaniel van Diepen 10 years ago
parent
commit
e5a2327613
1 changed files with 5 additions and 5 deletions
  1. 5 5
      site/js/index.js

+ 5 - 5
site/js/index.js

@@ -3,6 +3,11 @@ $(function(){
 	if(location.host != purl(__HOSTNAME__).attr('host')){
 		location.href = __HOSTNAME__;
 	}
+	$(document).ajaxStart(function(){
+		$("#loading").show();
+	}).ajaxStop(function(){
+		$("#loading").hide();
+	});
 	Pomo.domain = 'messages';
 	Pomo.unescapeStrings = true;
 	var _ = window._ = function(text){
@@ -626,11 +631,6 @@ $(function(){
 			}
 		},1000);
 		delayedload();
-		$(document).ajaxStart(function(){
-			$("#loading").show();
-		}).ajaxStop(function(){
-			$("#loading").hide();
-		});
 		$('body').show();
 		$('body').resize();
 	});