nanoJS

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.

Because is so small and simple you can add or remove methods directly in the library, meaning is very customizable. All methods are unrelated so removing one will not affect the library in any way (except each method).

Use this library as starting point and personalise it so it can meet your needs. We often use huge JavaScript libraries and framework for basic tasks.

Here are some code examples:

$(".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;");

})

It uses familiar jQuery like syntax.

It works in IE9 and later.

Download on Github

Here is the list of all the methods: