I want the following code, changed so that on button press, it scrolls the text area content from bottom to top.
$("button").on("click", function() {
$(document).ready(function() {
var $textarea = $('#update');
$textarea.scrollTop($textarea[0].scrollHeight);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Scroll</button>
<textarea Name="update" Id="update" cols="50" rows="25"></textarea>