diff options
author | Joris Guyonvarch | 2015-02-15 13:13:13 +0100 |
---|---|---|
committer | Joris Guyonvarch | 2015-02-15 13:13:13 +0100 |
commit | 71c8155599ea59cb4acb888843fadfa43c21e2c5 (patch) | |
tree | d838d71eb1d711e77e2e5e8874e15472bf1a35b4 /script.js | |
parent | 65bc73c3ad675dec2f4c630532fe94f7f7a70ac4 (diff) |
Fix contact flash when loading a page
Diffstat (limited to 'script.js')
-rw-r--r-- | script.js | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -23,10 +23,12 @@ }; function router() { - var url = location.hash.slice(2) || 'presentation'; - fetchFile('Pages/' + url + '.html', function(htmlData) { - var viewElement = document.getElementById('content'); - viewElement.innerHTML = htmlData; + var url = location.hash.slice(1) || 'presentation'; + var contentElement = document.getElementById('content'); + fetchFile('Pages' + url + '.html', function(contentData) { + fetchFile('Pages/contact.html', function(contactData) { + contentElement.innerHTML = contentData + contactData; + }); }); } |