Ajaxit is a JQuery plugin that converts your site to an ajax site without having to rewrite it.
- Auto handling of javascript and CSS.
- Supports history (back and forward buttons).
- Supports ie6, 7, 8, chrome and firefox 3.x.
- No need to recode your site to use this plugin.
- SEO friendly.
<script type="text/javascript" src="/path/to/plugin/jquery.history.js"> </script> <script type="text/javascript" src="/path/to/plugin/ajaxit.js"> </script>
Initialize the plugin as follows:
<script type="text/javascript">
$.ajaxIt.ajaxItArea = "";
$.ajaxIt.basePath = "/";
$.ajaxIt.onSuccess = function () {
// This will be executed after a successful ajax call
};
$.ajaxIt.onStart = function () {
// This will be executed in parallel with the ajax call
};
$.ajaxIt.onError = function (event, request, options, error) {
// This will be executed in case of an ajax error
};
$.ajaxIt.excludeURL = new Array('products/flashfirebug/demo');
$.ajaxIt.init();
</script>
- $.ajaxIt.ajaxItArea
a comma separated list of JQuery selectors to replace on page refresh, if it fails to find any of these selectors between pages, it will replace the body
e.g : $.ajaxIt.ajaxItArea = "#wrapper, body div#main.sidebar";
- $.ajaxIt.basePath
The basepath of your site, if your site is on a main domain, this will be /, if subfolder, it will be /subfolder/
$.ajaxIt.basePath = "/subfoldername/";
- $.ajaxIt.onSuccess
This will be executed after a successful ajax call
$.ajaxIt.onSuccess = function () {
alert(ajax executed);
};
- $.ajaxIt.onStart
This will be executed in parallel with the ajax call
$.ajaxIt.onStart = function () {
alert("in parallel with the ajax call");
};
- $.ajaxIt.onError
This will be executed in case of an ajax error
$.ajaxIt.onError = function (event, request, options, error) {
alert("there was an error with the call");
};
- $.ajaxIt.excludeURL
To exclude URLs from the ajaxification
$.ajaxIt.excludeURL = new Array('products/flashfirebug/demo');
- $.ajaxIt.init();
To initialize the plugin
$.ajaxIt.init();
Ashraf Amayreh
Developers
Waleed Qadi
Fareed Namrouti
Extension Web Design and Visual Elements
Mohamed Mahmoud
- Login to post comments