Ajaxify Lite

Based on the simplicity of the original Ajaxify plugin, I’ve re-worked the code to use jQuery 1.4 ('submit' events handled via .live()!) and removed many of the extra features to make a stripped back, ‘clean’ version of the plugin.

The same features are present, so you can specify the target for the ajax request using the target="" attribute for either <a/>s or <form/>s, the URL is automatically selected from either the href="" or action="" attributes depending on the element type, and the button data is also sent (including _x and _y for <input type="image"/>).

Using the .live() method, you can apply the .ajaxify() method to elements not yet in the DOM, so for example if you used the selector a.ajaxify any future links, imported to the page via AJAX for example, that matched the selector, would still be run via AJAX.

You can try out the demo below if you’d like, and the code can be downloaded here (I’ve included the minified version in the archive). Requires jQuery 1.4 (tested with 1.4.3) - not included.

Any comments, please see the blog post.

Links

Links update area

Form