This code is meant to scroll to an element "timeline" when you click on anything of the class "modalButton."
The code is located inside an iFrame.
It works perfectly on Chrome in my desktop, but it's not working inside the iPhone (both Chrome & Safari). Is there any fix to this or alternate methods to make this work?
<script>
$( document ).ready(function() {
$( ".modalButton" ).click(function() {
document.getElementById("timeline").scrollIntoView();
});
});
</script>