Collider JS
Check if DOM elements positions to each other
Installation
NPM
npm install collider-js --save
YARN
yarn add collider-js
Usage
import collider from 'collider-js';
of
var collider = require('collider-js');
Methods
;
Element1, Element2 - CSS Selectors
Returns boolean if elements touch each other.
;
Element1, Element2 - CSS Selectors
Returns boolean if top of Element1 is higher than top of Element2.
;
Element1, Element2 - CSS Selectors
px - Trigger range
Check if Element1's top is higher to Element2's bottom to px
Licence
MIT