$.pagex Demo

Pagex is a jQuery plugin for hash routing. Pages (layouts) loads on demand via ajax request, and remains in DOM for further openings. Any DOM Element, including body, can be used as a page container, so you can refresh full page or leave some elements static for all pages. CSS animation is used for page transitions.

Put all your page views to some folder, for example "layouts". Let's create file 'main-view.html'. To open this layout you have to write this:

	$.pagex.open('layouts/main-view.html');

To shorten and beautify you code, you can set some options:

	$.pagex.prefix = 'layouts/';
	$.pagex.postfix = '.html';
	$.pagex.open('main-view');

<< back page 1 page 2 page 3 delayed page 4 delayed error