jBone

http://kupriyanenko.github.io/jbone/
JavaScript Library for DOM manipulation in modern browsers with jQuery-compatible API.
Replacement jQuery for Backbone in browsers (2.5kb gzipped, faster than jQuery/Zepto)
Why jBone?
jBone is extremely small (2.5kb) and realy fast library. Main jBone idea - it's as much as possible to use native JavaScript methods in your project.
jBone it is ideal solutions for applications based on Backbone and running on mobile devices. jBone project was created to allow people using Backbone without jQuery.
Get it
With bower
$ bower install jbone --save
With component
component install kupriyanenko/jbone
With nodejs or browserify
$ npm install jbone --save
Use it
Add a <script>
element for jbone.js
<script src="path/to/jbone/dist/jbone.js"></script>
Or include like npm module (with nodejs or browserify)
var $ = require('jbone');
And write awesome code:
var $input = $("<input>", {
"class": "name"
}).val("John");
$input.on("click.space", function(e) {
console.log("clicked on", this);
});
$input.trigger("click");
$input.off(".space");
Extend it
jBone.fn.addClass = function(className) {
var i = 0,
length = this.length;
for (; i < length; i++) {
this[i].classList.add(className);
}
return this;
};
$(".header").addClass("loaded");
AJAX, Deferred
This part is not covered on jBone. Yuo can select one of a huge amount implementations AJAX and Promises/A+.
For example: when, Q, simply-deferred, AJAX.
Example AJAX connecting:
jBone.ajax = reqwest.compat;
$.ajax({
url: "http://example.com"
});
Example Deferred connecting:
Deferred.installInto(jBone);
var deferred = $.Deferred();
$.when(deferred).then(function(response) {
});
API
jBone
Attributes
Data
Event
Manipulation
Traversing
Utilities
Array methods
Running the Tests
Node
npm install
npm test
Browsers
bower install
- Open page with tests in browser
test/tests.html