This is my code:
$(document).ready(function() {
$('#text1')
.hide()
.fadeOut(300)
.fadeIn(300)
.fadeOut(300)
.fadeIn(300)
.fadeOut(300)
.fadeIn(300)
.delay(10000)
.hide(1);
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.0/jquery.min.js"></script>
<div id="text1" style="background-repeat:repeat;left:10px;top:100px; position:fixed">This is a test</div>
It shows a message for 10 seconds,then hides it. At mobile devices, when the message hides, screen scroll automatically to the top of screen. I want to prevent it.