0.1.6 • Published 2 years ago

create-and-append-element v0.1.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years 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

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago