Код: Выделить всё
scrollTo: function (anchor) {
var headerHeight = $('#main-header').outerHeight() || 0;
var targetOffset = $('#' + anchor).offset();
if (targetOffset) {
$('html, body').animate({
'scrollTop': targetOffset.top - headerHeight
}, 500);
}
},
Что мне не хватает?
Подробнее здесь: https://stackoverflow.com/questions/797 ... -correctly
Мобильная версия