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