aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--router.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/router.js b/router.js
index 84c8ab1..234c50b 100644
--- a/router.js
+++ b/router.js
@@ -29,7 +29,10 @@
function router() {
var url = location.hash.slice(2) || 'presentation';
var contentElement = document.getElementById('content');
+ contentElement.style.height = contentElement.offsetHeight + 'px';
+ contentElement.innerHTML = '';
fetchFile('Pages/' + url + '.md', function(contentMd) {
+ contentElement.style.height = 'auto';
contentElement.innerHTML = markdown.toHTML(contentMd);
}, function() {
var notFoundPage = '<h1>Page non trouvée</h1><a href="#">Retour à l\'accueil</a>';