0.1.6 • Published 11 months ago

create-and-append-element v0.1.6

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

create-and-append-element

This package allows you to create and place any HTML tag of your choice with ease.

This is my first package, hope it will be helpful. :)

Install

Install with npm:

$ npm install create-and-append-element

Usage

import createAndAppendElement from 'create-and-append-element';

// createAndAppendElement('tagName', whereToAppend, 'class', { attribute: value })

const link = createAndAppendElement('a', document.body, 'link', {
    href: 'https://url.com',
    // attributes...
});

const img = createAndAppendElement('img', link, 'image', {
    src: 'https://image.png',
    wdth: 500
});

About

Author

Simon Karapetyan

0.1.6

11 months ago

0.1.5

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago