Hello,
this is not so much a snippet, module or plugin but a simple way to make all sites ’AJAXY’ without serverside coding.
Only thing needed is to set the class attribute of links.
It is a modified version of the code from
http://www.twinhelix.com in that it allows more than one class to be defined for a link.
Basically, it works like this:
In your template:
- Include the javascript lib. (see attached example)
- Create a <div name="sometargetname">initial content</div>
- Give links a class of ’loadinto-sometargetname’ (you can have multiple classes separated by whitespace, so you can still use CSS to style them).
- Now if you click the link, the page will be loaded into the div instead of being called as a new page.
N.B. the pages that will be loaded into the div MUST be valid html/xml/xhtml, otherwise Firefox will not play.
This means that you make 1 page which is fully layouted and pretty and the rest is simple xml stuff.
Also easier on your webserver too
Greets!
Then,