Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

b.udy.js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

b.udy.js

Lightweight DOM manipulation library

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

b.udy.js :dog2:

A micro DOM library! With only one purpose: facilitate the creation and manipulation of DOM elements.

npm version Build Status

npm install b.udy.js

basic usage

// load b.udy
var b = require('b.udy');

// to create a element and return it
var element = b('div').element();

// to load a existing element
b(element);

// to set element id
b(element).id('element-id');

// to set element className
b(element).className('element-class other-element-class');

// to add element attribute
b(element).attr('data-type', 'div');

// to remove element attribute
b(element).removeAttr('data-type', 'div');

// to add element listener
b(element).listener('click', clickListener);

// to remove element listener
b(element).removeListener('click', clickListener);

// to set multiple properties
b(element).id('element').className('element-class').listener('click', clickListener);

methods

  • b**(nodeType | element)**: Create or load a DOM element;
  • b.element(): Return the DOM element;
  • b.id(value): Set the DOM element id;
  • b.className(value): Set the DOM element className;
  • b.attr(key, value): Add a attribute to the DOM element;
  • b.removeAttr(key): Remove a attribute from the DOM element;
  • b.listener(eventType, callback): Add a event listener to the DOM element;
  • b.removeListener(eventType, callback): Remove a event listener from the DOM element;

support

  • chrome: latest;
  • firefox: latest;
  • safari: latest;
  • internet explore: 9+;

contribute

Everyone can contribute! Finding bugs, creating issues, improving documentation, improving editor it self or creating components. Every contribution will be welcomed! :santa:

Fork it -> Branch it -> Test it -> Push it -> Pull Request it

Keywords

FAQs

Package last updated on 27 Aug 2015

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