New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jbone

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jbone

Library for DOM manipulation

  • 1.0.17
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

jBone

Build Status Bower version NPM version

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:

// connect reqwest on your page https://rawgithub.com/ded/reqwest/master/reqwest.min.js

jBone.ajax = reqwest.compat;

$.ajax({
    url: "http://example.com"
});

Example Deferred connecting:

// connect simply-deferred on your page https://rawgithub.com/sudhirj/simply-deferred/master/deferred.min.js

Deferred.installInto(jBone);

var deferred = $.Deferred();

$.when(deferred).then(function(response) {
    // some code
});

API

jBone

Attributes

Data

Event

Manipulation

Traversing

Utilities

Array methods

Running the Tests

Node

  1. npm install
  2. npm test

Browsers

  1. bower install
  2. Open page with tests in browser test/tests.html

Keywords

FAQs

Package last updated on 22 May 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc