amirajs

1.0.2 • Public • Published

amirajs

Amirajs is Lightweight (~0.4kb compressed) JS Library for DOM Manipulation


MIT License MIT License Open Collective Open Collective


Table of Contents

Usage

You can see the example usage here

Setup

You can import the external script inside the <body>{here}</body> tag.

<!-- imported script -->
<script src="https://unpkg.com/amirajs@1.0.1/amira.min.js"></script>

NB: Remember to use the amira APIs below the imported script.

APIs

insert

You can insert both value or text in single function.

$(".amira").insert("Hello World");

empty

You can empty both value or text in single function.

$(".amira").empty();

setAttr

You can set elements attribute by using setAttr function.

$(".amira").setAttr("id", "11");

Also supports fluent design

$(".amira").setAttr("id", "11").setAttr("style", "color: red;");

removeAttr

You can remove elements attribute by using removeAttr function.

$(".amira").removeAttr("id");

show

You can show elements by using show function.

$(".amira").show();

hide

You can hide elements by using hide function.

$(".amira").hide();

Contributing

You can create new pull requests here

License

This javascript library is published under MIT License

Package Sidebar

Install

npm i amirajs

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

7.53 kB

Total Files

6

Last publish

Collaborators

  • developerfauzan