1
이 JQuery 기능이 있습니다. 콘텐츠를 중첩하는 고정 된 Navbar가있어서 크기를 60px로 스크롤하고 싶습니다. 이 코드에이 60px를 어떻게 추가 할 수 있습니까?Jquery 앵커로 스크롤 -60px
/**
* Scroll to section
* @param string des HTML identity of section block
* @return void
*/
function goToSectionID(des){
var os = (history.pushState)?51:0;
os = (jQuery(window).width()>800)?os:0;
var pos = (jQuery(des).length>0)?jQuery(des).offset().top-os:0;
onanimate = true;
jQuery('html,body').animate({scrollTop:pos},1000,function(){
if(history.pushState){
history.pushState(null,null,des);
}else window.location.hash = des;
jQuery(window).scrollTop(pos);
onanimate=false
});
}
'jQuery를 (창) .scrollTop (POS - 60)입니다;'? –