I have a structure something like this:
<div>
<div id="scrollID" style="height:100px;">
content here
</div>
</div>
<script>
document.getElementById("myDIV").addEventListener("touchstart", myFunction);
function myFunction() {
// want to get my position
}
</script>
I want to get the distance from top, when user start scrolling (actually touching in mobile). My final purose is implementing pull to refresh for child div
.
Any idea?