I have some div with scroll.
I want to do with javascript, that function will active when the scroll of the div will comes to element.
I want to do this without jQuery.
How can I do it?
example for source:
the div id=bb, is the element that when the scroll comes to, it will active the 'example' function
<div id=aa> // this div have scrollbar
<br><br><br><Br><br><br><br><br><br><br><br><br><br><Br><br><br><br><br>
<div id=bb>this is the element that will active the function</div>
<br><br><br><Br><br><br><br><br><br><br><br><br><br><Br><br><br><br><br>
</div>
this is the function that i want to active when the scroll comes to the element:
function example() {
document.write('work!');
}