1
Я пытаюсь загрузить содержимое div в определенную точку без анимации.Нагрузка на прокручиваемый div
HTML
<div class="fixed-block">
Fixed Block
</div>
<div class="content">
Content
</div>
CSS
.fixed-block {
background: red;
height: 400px;
width: 100%;
position: fixed;
top: 0;
}
.content {
height: 700px;
margin-top: 400px;
background: yellow;
position: relative;
}
JS
if(window.location.hash) {
var hash = window.location.hash;
var link = $("[href='"+ hash +"']");
if (hash == "") {
$('html, body').animate({
scrollTop: $(".content").offset().top
}, 1000);
}