1.0.2 • Published 3 years ago

amirajs v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

amirajs

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



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