keybase
[m6w6/m6w6.github.io] / _posts / 2004-08-05-update-overflowauto-in-mozilla.md
1 ---
2 title: 'Update: overflow:auto in Mozilla'
3 author: m6w6
4 tags:
5 - WEB
6 ---
7
8 If you want the page to scroll when the scrolling-enabled DIV has nothing to
9 scroll you'll have to wrap the contents of the _scrollMe_ function into the
10 following **if** statement:
11
12 ```js
13 function scrollMe(event)
14 {
15 if (event.currentTarget.scrollHeight >
16 event.currentTarget.offsetHeight) {
17 // ...
18 }
19 }
20 ```
21
22 Have fun!