Fork me on GitHub

By default Feaxures uses a lot of jQuery's capabilities. I'm talking here about Callbacks, Deferreds, event delegation, dom manipulation etc. Also the default loader is window.require. But you can change all that by setting a global object called FeaxuresDependencies

Use your preferred loader

FeaxuresDependencies.loader = function(files, onSuccess, onError) {
    // write your own implementation or use some other library
};

onSuccess and onError are function that are executed when the files are finished loading or if there's an error during loading.

Hate jQuery?

Here's what your FeaxureDependencies object must contain:

Deferred

FeaxuresDependencies.Deferred = DeferredImplementation;

Like when.js, rsvp.js or tiny promise.js

Callbacks

FeaxuresDependencies.EventManager = EventBehaviourImplementation;

A functional mixin that alows for on, off, trigger methods. Like the one from my Callbacks library

Selector

FeaxuresDependencies.selector = Sizzle || Ender || Zepto;

Event binding

FeaxuresDependencies.bindEvent = function(domElement, eventName, callback) {
    // write your own implementation
};
FeaxuresDependencies.unbindEvent = function(domElement, eventName, callback) {
    // write your own implementation
};
FeaxuresDependencies.triggerEvent = function(domElement, eventName, data) {
    // write your own implementation
};

Event delegation

If you want to have lazy loaded feaxures you must have event delegation, otherwise you can live without this (you have to provide a noop function though),

FeaxuresDependencies.delegateEvent = function(domElement, selector, eventName, callback) {
    // write your own implementation
};
FeaxuresDependencies.undelegateEvent = function(domElement, selector, eventName, callback) {
    // write your own implementation
};