0.3.0 • Published 5 years ago

@cspoels/element v0.3.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@cspoels:element

Install

yarn add @cspoels/Element

Use

To start, load the script

const Element = require('@cspoels/element')

To create a new element in the body of the document

let element = new Element(document.body).create()

An element will be created, it will remember the root for appending alter. The root parameter can be

  • A string: To search by id
  • A DOM element to appen dto
  • Another Element instance
  • Default null, will transform to document.body

you can alter the element with functions as:

element.class('is-primary').id('super-element').text('I am the best element')
0.3.0

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago