scroll to posts

This commit is contained in:
Baris Usakli
2013-08-01 16:11:00 -04:00
parent dbfd3c19a1
commit 720dd9e960
7 changed files with 97 additions and 52 deletions

View File

@@ -29,9 +29,10 @@ var ajaxify = {};
// leave room and join global
app.enter_room('global');
var url = url.replace(/\/$/, "");
var hash = window.location.hash;
if(url.indexOf(RELATIVE_PATH.slice(1)) !== -1) {
url = url.slice(RELATIVE_PATH.length);
}
@@ -67,7 +68,12 @@ var ajaxify = {};
}
app.process_page();
jQuery('#content, #footer').stop(true, true).fadeIn(200);
jQuery('#content, #footer').stop(true, true).fadeIn(200, function() {
console.log('done loading');
app.scrollToPost(hash.substr(1));
});
}, url, template);
return true;