more comments

This commit is contained in:
Chris Polis 2011-09-15 15:57:41 -07:00
parent 39da010c0e
commit 98bebafd8c

View file

@ -23,9 +23,12 @@
var runAfterLoading = function() {
self.switchPage = function(page) {
page = page || window.location.hash.replace('#','');
// Load page content from cache
if(self.settings.cache) {
$(self).hide().html(self.pages[page])[self.settings.animation]();
// Fetch page content
} else {
$.get(page+'.html', function(content) {
$(self).hide().html(content)[self.settings.animation]();