Need JS help with Gravity Forms

In this page (site address is hidden - check chat transcript please) there is a Gravity form in here - . The issue is, when a visitor goes through a validation error, the page loads up and scrolls back to the top of the page. The chat representative helped me with the following JS code

(function($) {
$(document).ready(function() {
if($('.page-id-4545 .validation_error').length) {
if($('#toogle-woico .toggle').length) {
$('#toogle-woico .toggle').addClass('toggle-active');
$('html, body').animate({
scrollTop: $("#toogle-woico").offset().top
}, 1000);

It did work for one second, but after that, the page scrolls back to the top again. Please help.