lib.history.adapter.jquery.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spiffyui Show documentation
Show all versions of spiffyui Show documentation
A UI/UX framework that can help build beautiful, fast, flexible, secure, maintainable applications with GWT and REST.
// Closure
(function(window,undefined){
// Localise Globals
var
History = window.History = window.History||{},
jQuery = window.jQuery;
// Check Existence
if ( typeof History.Adapter !== 'undefined' ) {
throw new Error('History.js Adapter has already been loaded...');
}
// Add the Adapter
History.Adapter = {
bind: function(el,event,callback){
jQuery(el).bind(event,callback);
},
trigger: function(el,event){
jQuery(el).trigger(event);
},
onDomLoad: function(callback) {
jQuery(callback);
}
};
// Try and Initialise History
if ( typeof History.init !== 'undefined' ) {
History.init();
}
})(window);