An open API service indexing awesome lists of open source software.

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.

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