Skip to content

dependency-free vanilla js plugin to match element heights

License

Notifications You must be signed in to change notification settings

PeteyRev/js-match-height

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-match-height

Dependency-free vanilla js plugin to match element heights, in a tiny file (2kb).

Getting Started

npm i js-match-height --save

Use

Import the library and simply instatiate with your elements, no options required. MatchHeight will correct heights if needed on window resize, using a debounce method to improve performance.

import { MatchHeight } from 'js-match-height';

Pass your elements.

const matchHeight = new MatchHeight('ul.list-items  li');

The timeout for the debounce method is defaulted at 250. You can set your time if needed.

const matchHeight = new MatchHeight('ul.list-items  li', { timeout:400 });

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • jquery match height

About

dependency-free vanilla js plugin to match element heights

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published