README.md |
Pagify.js
A jQuery plugin for effortlessly creating single page web sites.
Usage
Load Pagify and jQuery:
<script src="jquery.min.js" type="text/javascript"></script>
<script src="pagify.js" type="text/javascript"></script>
Attach a div that will hold the content of each page by listing pages and options:
$('#page_holder).pagify({
pages: ['home', 'about', 'contact'],
default: 'home' // The name of a page or 'empty'
});
Show other pages by linking to hashes:
<a href='#contact'>Contact</a>
Note: Page content should be found in pagename.html and pagify will respond to #pagename
Options
pages
- an array of page names
default
- the page that is loaded by default or 'empty' for an empty div
animation
- the jQuery animation that is used to show pages, i.e. fadeIn
, show
, slideUp
, slideDown
. show
is used by default.
cache
- true or false. Determines if all pages are loaded upfront or not. false by default.
Etc...
Created by @ChrisPolis