Skip to content
forked from vladocar/nanoJS

Minimal standalone JS library for DOM manipulation

License

Notifications You must be signed in to change notification settings

iqbalhood/nanoJS

 
 

Repository files navigation

nanoJS

License MIT Gzip Size npm

Minimal standalone JS library for DOM manipulation

nanoJS is around 100 lines of code (0.6 Kb compressed) JavaScript library for basic DOM manipulation. It has jQuery like syntax and supports chaining.

Syntax demos:

$(".someClass").css("background-color:green;").html("Hello World");

$('#c').animate('2.3', '1.2','0','1','1','0','0', '0','0','1').css('background-color:red').text('Hello');

$("#a").on("click", function(){

  $("#someDiv").css("background-color:green;color:#fff;");

})

You can find it here some basic examples. also the Mission & Philosophy of nanoJS

It works in IE9 and later. (some methods addClass, removeClass and toggleClass will not work in IE9)

Read more here:

https://vladocar.github.io/nanoJS/

or on my blog:

http://www.vcarrer.com/2018/05/nanojs-javascript-for-dom-manipulation.html

You can use direct download or:

npm i @vladocar/nanojs
bower install nanoJS
yarn add @vladocar/nanojs
<script src="https://unpkg.com/@vladocar/[email protected]/src/nanoJS.min.js"></script>

Utils:

addClass
animate
attr
css
cssdom
empty
eq
getAttr
html
insertAfter, insertBefore, insertFirst insertLast
offset
on
removeAttr
removeClass
text
toggleClass

About

Minimal standalone JS library for DOM manipulation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 87.0%
  • HTML 10.5%
  • CSS 2.5%