reworked pagify.js, jquery animations are now supported
This commit is contained in:
parent
963327a411
commit
73766a769f
|
@ -10,6 +10,7 @@
|
|||
$(document).ready(function() {
|
||||
$('#page_holder').pagify({
|
||||
pages: ['about', 'usage', 'options'],
|
||||
animation: 'fadeIn',
|
||||
default: 'about'
|
||||
});
|
||||
});
|
||||
|
|
|
@ -21,7 +21,14 @@
|
|||
|
||||
this.switchPage = function(page) {
|
||||
page = page || window.location.hash.replace('#','');
|
||||
$(self).load(page+'.html');
|
||||
|
||||
if(self.settings.cache) {
|
||||
|
||||
} else {
|
||||
$.get(page+'.html', function(content) {
|
||||
$(self).hide().html(content)[self.settings.animation]();
|
||||
}, 'text');
|
||||
}
|
||||
}
|
||||
|
||||
// Respond to hash changes
|
||||
|
|
Loading…
Reference in a new issue