From e5c1edd5f5e9d0a4a0a34cae0ed864bb9e6d33b8 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 26 Nov 2013 12:25:19 -0500 Subject: [PATCH] using ajaxifying class for content and footer instead of jquery fadein/out --- public/src/ajaxify.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index d3581e947e..64c55691e2 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -88,7 +88,7 @@ var ajaxify = {}; translator.load(tpl_url); - jQuery('#footer, #content').fadeOut(100); + jQuery('#footer, #content').addClass('ajaxifying'); templates.flush(); templates.load_template(function () { @@ -105,17 +105,17 @@ var ajaxify = {}; app.processPage(); - jQuery('#content, #footer').stop(true, true).fadeIn(200, function () { - if (window.location.hash) { - hash = window.location.hash; - } + jQuery('#content, #footer').stop(true, true).removeClass('ajaxifying'); - if (hash) { - require(['forum/topic'], function(topic) { - topic.scrollToPost(hash.substr(1)); - }); - } - }); + if (window.location.hash) { + hash = window.location.hash; + } + + if (hash) { + require(['forum/topic'], function(topic) { + topic.scrollToPost(hash.substr(1)); + }); + } utils.refreshTitle(url);