I'm automatically fetching information from a database, from which you create a scroll in a div. The problem is that I have to scroll down to follow the information that appears on the screen. How would I have the scroll scroll down automatically with the information, regardless of how much the database brings? I tested this code, but it did not work:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script><script>$("#resultados").scrollTop($("#resultados")[0].scrollHeight);
</script>
<div id="resultados" style="overflow: scroll">
Aqui aparece os resultados
</div>