I am trying to create a DOM event recorder to reproduce how a user interacts with a page. I would like to use the jquery.on function so that I can record all the events on the page. In this particular case, I am trying to record scroll events, but ultimately I want to record all kinds of events.
Here is a link to my JS Fiddle. I expect the text "Hello" to change to "Bye" after the user scrolls through the div.
http://jsfiddle.net/MnpPM/
Herel is html
<div id="parent" style="height: 300px; width: 300px; overflow: scroll">
<div style="height: 500px; width: 500px">
Hello
</div>
</div>
and here javascript
$(document).on('scroll', '*', function () { $(this).html('Bye') });
source
share