Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 458 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 458 Bytes

vanillajs-dom

A collection of simple DOM utilities for those who prefer a Vanilla JS approach.

Installation

This is how I use it with a Webpack bundled project. Your set-up may be different.

$ npm install vanillajs-dom --save-dev
import { parents, parent, outerHeight, scrollTop } from "vanillajs-dom";

parents(element, ".selector[data-type=foo]");
parent(element, ".selector[data-type=foo]");
outerHeight(element);
scrollTop();