상단메뉴 고정하기
[code]
$(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"
});
}
});
[/code]
그누보드 기본 템플릿 기준
$(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"
});
}
});
[/code]
그누보드 기본 템플릿 기준
댓글 9개
9년 전
미안하지만 저 스크립트를 어느곳에 넣으면될가요
초보가 보기에는 뭘 어덯게 해야 할지 모르겠내요 ....
초보가 보기에는 뭘 어덯게 해야 할지 모르겠내요 ....
9년 전
위의 스크립트를 애래와 같이 <script type="text/javascript">와 </script>로 감싸서
head.php의 적당한 곳에 넣으시면 상단메뉴(헤드부분)가 고정이 됩니다.
--- 아 래 ---
<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>
head.php의 적당한 곳에 넣으시면 상단메뉴(헤드부분)가 고정이 됩니다.
--- 아 래 ---
<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>
9년 전
좋은 팁 감사합니다
9년 전
완전 짱짱, 감사합니다!
8년 전
정말 감사합니다.^^
7년 전
감사합니다
7년 전
좋은정보 감사합니다.
5년 전
정말 고맙습니다.
5년 전
ㅠㅠ 왜 않될까요??
게시판 목록
그누보드5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 | 3년 전 | 4409 | ||
| 504 | 9년 전 | 8212 | ||
| 503 | 9년 전 | 5957 | ||
| 502 | 10년 전 | 13127 | ||
| 501 | 10년 전 | 8967 | ||
| 500 | 10년 전 | 8108 | ||
| 499 | 10년 전 | 24082 | ||
| 498 | 10년 전 | 7360 | ||
| 497 | 10년 전 | 9314 | ||
| 496 | 10년 전 | 12533 | ||
| 495 | 10년 전 | 6833 | ||
| 494 |
|
10년 전 | 6618 | |
| 493 | 10년 전 | 12655 | ||
| 492 | 10년 전 | 11278 | ||
| 491 |
고등동물고등어
|
10년 전 | 10617 | |
| 490 | 10년 전 | 9495 | ||
| 489 | 10년 전 | 16204 | ||
| 488 |
saesini
|
10년 전 | 8631 | |
| 487 | 10년 전 | 14356 | ||
| 486 | 10년 전 | 8059 | ||
| 485 | 10년 전 | 9633 | ||
| 484 |
|
10년 전 | 6702 | |
| 483 |
untitled
|
10년 전 | 9983 | |
| 482 | 10년 전 | 8278 | ||
| 481 | 10년 전 | 16276 | ||
| 480 | 10년 전 | 10372 | ||
| 479 |
|
10년 전 | 8104 | |
| 478 | 10년 전 | 12751 | ||
| 477 | 10년 전 | 6361 | ||
| 476 | 10년 전 | 8344 | ||
| 475 |
wonilone
|
10년 전 | 7319 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기