dom-by-selector

1.1.6 • Public • Published

dom-by-selector

this is little function to convert selector String to the DOM

Install

$npm install dom-by-selector

Usage

var domBySelector = require( 'dom-by-selector' );

domBySelector( '#myId' );
//<div id="myId"></div>

domBySelector( '.myClass' );
//<div class="myClass"></div>

domBySelector( '.myClass1 .myClass2' );
//<div class="myClass1 myClass2"></div>

domBySelector( '.myClass1 .myClass2 #myId' );
//<div id="myId" class="myClass1 myClass2"></div>

domBySelector( '.myClass1', 'p' );
//<p class="myClass1"></p>

API

var domBySelector = require( 'dom-by-selector' );

build

  • npm install babel -g
  • npm run compile

License

© 2016 ingpdw. MIT License

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.60latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.60
1.1.50
1.1.40
1.1.30
1.1.20
1.1.10
1.0.00

Package Sidebar

Install

npm i dom-by-selector

Weekly Downloads

0

Version

1.1.6

License

MIT

Last publish

Collaborators

  • ingpdw