more comments
This commit is contained in:
parent
39da010c0e
commit
98bebafd8c
|
@ -24,8 +24,11 @@
|
||||||
self.switchPage = function(page) {
|
self.switchPage = function(page) {
|
||||||
page = page || window.location.hash.replace('#','');
|
page = page || window.location.hash.replace('#','');
|
||||||
|
|
||||||
|
// Load page content from cache
|
||||||
if(self.settings.cache) {
|
if(self.settings.cache) {
|
||||||
$(self).hide().html(self.pages[page])[self.settings.animation]();
|
$(self).hide().html(self.pages[page])[self.settings.animation]();
|
||||||
|
|
||||||
|
// Fetch page content
|
||||||
} else {
|
} else {
|
||||||
$.get(page+'.html', function(content) {
|
$.get(page+'.html', function(content) {
|
||||||
$(self).hide().html(content)[self.settings.animation]();
|
$(self).hide().html(content)[self.settings.animation]();
|
||||||
|
|
Loading…
Reference in a new issue