1.1.1 • Published 9 years ago

resize-end v1.1.1

Weekly downloads
141
License
MIT
Repository
github
Last release
9 years ago

Resize End

Listening to the resize event can be expensive as it fires every single time the viewport changes. Using the Resize End plugin can prevent thrashing by firing just one event, resizeend, when the user has stopped resizing.

Install

File include

Download the latest resize-end.min.js from http://github.com/InventingWithMonster/resize-end and include it in your HTML document with a script tag, ie:

<script src="/path/to/resize-end.min.js"></script>

NPM (recommended)

First install Resize End in your project root.

$ npm install resize-end

Then include in your project using require().

require('resize-end');

Use

Simply replace your resize event listeners with resizeend:

$(window).on('resizeend', function () {
    // your callback
});

window.addEventListener('resizeend', function () {
    // your callback
});
1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago

0.0.1

9 years ago