DollarJS makes interacting with DOM simple.
It's the only library that you will ever need for finding and manipulating Elements, binding events to your document, dynamically styling your content, and more.
Use it as a jQuery replacement to enjoy most of the same features at a fraction of the size. And, unlike competing libraries, DollarJS is modular! Create a custom build for your project and include only the modules that you need.
Get a set of DOM Elements using a Selector:
$('#id') $('.class') $('p') $('p.class') etc...
Interact with a set of matched elements by chaining together the many features of DollarJS:
var $body = $('body').css({ background: '#369' }); $body.addClass('foo').on('click', function () { console.log(this.className); });
Download our latest production bundle (minified) or get the more readable development version. After you download, place the script into your project directory and include it on your page:
<script src="dollar.min.js" type="text/javascript"></script>
Alternatively you can include DollarJS in your app using the steps below:
$ npm install dollar-js --save
var $ = require('dollar-js');