element-pants

Some pants for your elements.

npm install element-pants
3 downloads in the last week
12 downloads in the last month

Element Pants

Element Pants provides functions for working with the DOM in all of the usual ways. Element Pants is not limited to HTML document manipulation, and even handles XML and SVG just fine.

One benefit of Element Pants, depending on your perspective, is that it doesn't bother supporting older browsers. In fact, it hasn't even been tested in older versions of IE, because fuck that shit. We've got a nice pool here - let's not poop in it.

If you call the install function, Element Pants will install itself on Element prototypes so that it extends the DOM Element API, making it easier to use. You may find this offensive... luckily I don't care about your feelings on the matter.

API

hasClass, addClass, removeClass, toggleClass, getStyle, setStyle, hide, show, remove, find, findAll, on, off, create, install

Documentation

Read index.js.

Should I Use This?

Yes.

Installation

Element Pants if available via NPM and Bower, and works great as a CommonJS module, RequireJS module or even a regular old <script> include.

Licence

MIT

npm loves you