diff options
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; + }); }); } |