Код: Выделить всё
$(".section-form .form-wrap").hide();
$(".thank-you-content-wrap").show();
var $sectionForm = $('.section-form');
var stickyHeaderHeight = 85;
var offset = $sectionForm.offset().top - stickyHeaderHeight;
console.log('offset', offset);
setTimeout(() => {
if ($sectionForm.length > 0) {
var stickyHeaderHeight = 85;
var offset = $sectionForm.offset().top - stickyHeaderHeight;
console.log('offset', offset);
$('html, body').animate({
scrollTop: offset
}, 'slow');
}
}, 1100);
Работает на всех устройствах с одинаковым поведением
Подробнее здесь: https://stackoverflow.com/questions/783 ... and-mobile