A modern cross-platform JavaScript library & only 18 bytes
...or just 10 bytes minified

Download Now


Click event

$.getElementById("demo1").addEventListener('click', function(){
Try it!

Document width and height

console.log("Height: "+$.body.clientHeight);
console.log("Width: "+$.body.clientWidth);
See the console for output

More examples and documentation can be found here.


Hey bro, are you serious?

Sure... I built diy.js because I wanted the flexibility to do anything but without the expensive weight of other JavaScript libraries.

How long did diy.js take to develop?

I've been developing diy.js for three years, about nine months of this was ensuring that diy.js was fully browser tested.

What about tests?

Testing is vital when you are running in many different environments. Thats why diy.js has 100% test coverage check it out.

Where can I get the source code for diy.js?

It's right here — have fun.

How can I contact you?

I'm on Twitter, Github or email me at

Fork me on GitHub