class-name-starting-with

1.0.0 • Public • Published

class-name-starting-with

Finds all element starting with string. Queries the DOM for '[class*="string"]'.

Usage

var classNameStartingWith = require('class-name-starting-with');
classNameStartingWith('prefix__', el);
// => [HTMLElement]

API

classNameStartingWith(string, rootElement)

Returns an array with the elements with class name matching string.

string

Type: string

rootElement

Type: undefined, HTMLElement

Readme

Keywords

Package Sidebar

Install

npm i class-name-starting-with

Weekly Downloads

7

Version

1.0.0

License

MIT

Last publish

Collaborators

  • emiljohansson