새로고침 한번할때마다 계속 글이 내려갑니다.
상단메뉴 고정시키려고
<script type="text/javascript">
$(window).scroll(function () {
var height = $(document).scrollTop();
if (parseInt(height) > 0) {
$('#hd').css({
"position": "fixed",
"display": "block",
"width":"100%",
"z-index" : "10000"
});
$('#wrapper').css({
"padding-top":"116px"
});
} else {
$('.hd').css({
"display": "block",
"position":"relative",
"z-index" : "10000"
});
$('#wrapper').css({
"padding-top":"116px"
});
}
});
</script>
를 쓰고나서부터 이러네요 ,,
도와주세요
답변 2개
$(document) -> $(window)
이렇게 바꿔 보시겠어요?
'#wrapper 에 padding값이 있네요 이건뭔가여
답변을 작성하려면 로그인이 필요합니다.