I have a setup that looks something like the following:
<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>
My goal is to obtain the distance from the top when the user begins scrolling (specifically touching on mobile). I am looking to implement pull-to-refresh for the child div
.
Any thoughts or suggestions?