https://github.com/inambe/resizee
Resizee is simply an event emitter, but a bit helpful.
https://github.com/inambe/resizee
events javascript responsive-design
Last synced: 11 months ago
JSON representation
Resizee is simply an event emitter, but a bit helpful.
- Host: GitHub
- URL: https://github.com/inambe/resizee
- Owner: Inambe
- Created: 2019-04-07T10:43:38.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-07T11:04:09.000Z (about 7 years ago)
- Last Synced: 2025-03-27T09:19:08.744Z (about 1 year ago)
- Topics: events, javascript, responsive-design
- Language: HTML
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Resizee
Resizee is simply an event emitter, but a bit helpful.
It listens `resize` event on the `window` object. Whenever a `resize` event happens, it checks your configured `events`
and fire their listeners if window size satisfies the event rules.
# How to use ?
```
var resizee = new Resizee([
{
name: "onDesktop",
rules: {
minHeight: 500 // px
}
}
]);
resizee.on("onDesktop", eventName => {
console.log(eventName);
});
```
# Rules
You can use any of below rules to create your events.
`minHeight`
`maxHeight`
`minWidth`
`maxWidth`