How Ajaxy works

Ajaxy works by attaching click-event handlers to all anchors within your website.

When a link is clicked, assuming it points to another page within the website, Ajaxy will load that page via XHR.

Current content within the page is replaced with the content loaded via XHR, presenting the user with what appears to be an entirely new page. The elements that are filled with new content can be configured, obviously there's no point in replacing all content. Normally only the content area (e.g. #content) will need to be replaced.

In the background, Ajaxy utilisies the jQuery history plugin to enable back-button support and bookmarkable URLs. So, what once was:

http://www.website.com/foo/bar

Becomes...

http://www.website.com/#foo/bar

The hash at the end of a URL (#...) can be replaced without refreshing the page, this is essential to how Ajaxy works.

Ajaxy gives you full control over the actions that take place following a request. It does have a default behaviour, but if, for example, you wanted to make new content fade in, Ajaxy does give you the power to do that.