https://github.com/zmmbreeze/useoverflowevent
Way to detect overflow event support and use it with graceful degradation.
https://github.com/zmmbreeze/useoverflowevent
event javascript overflow-event
Last synced: about 1 year ago
JSON representation
Way to detect overflow event support and use it with graceful degradation.
- Host: GitHub
- URL: https://github.com/zmmbreeze/useoverflowevent
- Owner: zmmbreeze
- Created: 2014-02-26T11:57:01.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-27T15:41:59.000Z (over 12 years ago)
- Last Synced: 2025-04-09T19:13:10.232Z (about 1 year ago)
- Topics: event, javascript, overflow-event
- Language: JavaScript
- Homepage: http://zencode.in/useOverflowEvent/
- Size: 168 KB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
useOverflowEvent.js
===
Way to detect overflow event support and use it with graceful degradation. Overflow event now supported on Chrome(tested on 9+) and Firefox(tested on 1.5+).
[DEMO](http://nodejs.in/useOverflowEvent)
HOW TO USE
---
```javascript
useOverflowEvent(function (addOverflowListener) {
if (!addOverflowListener) {
// browser not support overflow event
// do somethings or nothing
return;
}
var container = document.getElementById('demo');
addOverflowListener(container, 'over', function () {
console.log('overflow');
});
addOverflowListener(container, 'under', function () {
console.log('underflow');
});
});
```
LICENTSE
---
MIT