I mean I have this code:
<script>
$(document).ready( function() {
$('html, body').animate({
scrollTop: $(".error").offset().top
}, 1500);
});
</script>
and it works fine. So, it scrolls to the first .error. This is OK, but I would like to scroll a little bit higher on the screen e.g. 20px more to the top so the whole input field with error is better to see. Now it is on the edge of the browser screen.
Like this?