Ajaxify v1.0.1 - 30 September, 2012 https://github.com/browserstate/ajaxify
Adapted by LI, Yu (liyu@clustertech.com)
- Integrated solution framework for turning static pages into ajaxify pages. The jquery history & scrollto plugin is integrated.
- Compatible with require.js.
- Configurable options. (see usage)
- Events support.
- Build-in progress indicator support. (And configurable).
- Intensively tested and bugs fixed.
- jquery.js
- underscore.js
(check versions in the lib dir)
- jquery.history.js
normally:
<script src="jquery.min.js"></script>
<script src="underscore-min.js"></script>
<script>
var ctAjaxify = {
options: {
// ...options...
}
};
</script>
<script src="ctAjaxify.min.js"></script>
// now you can bind events like
// window.ctAjaxify.on(<event>, function() { ... });
if you want to disable this, just
<html disableAjaxify>
Bind events as
window.ctAjaxify.on('event', func)
Event lists
- ajaxifyLoadingBegin
- ajaxifyAjaxBeforeSend param: [jqXHR, settings]
- ajaxifyBeforeUpdateContent param: [contentHtml]
- ajaxifyAfterUpdateContent
- ajaxifyBeforeInsertScript param: [$newScriptNode, $originScriptNode]
- ajaxifyLoadingEnd
- ajaxifyStateChangeComplete
- ajaxifyAjaxError param: [jqXHR, textStatus, errorThrown]
Same as original, licensed under the New BSD License