상단메뉴 고정하기
[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년 전 | 4427 | ||
| 504 | 10년 전 | 8214 | ||
| 503 | 10년 전 | 5959 | ||
| 502 | 10년 전 | 13131 | ||
| 501 | 10년 전 | 8967 | ||
| 500 | 10년 전 | 8111 | ||
| 499 | 10년 전 | 24083 | ||
| 498 | 10년 전 | 7361 | ||
| 497 | 10년 전 | 9318 | ||
| 496 | 10년 전 | 12534 | ||
| 495 | 10년 전 | 6834 | ||
| 494 |
|
10년 전 | 6619 | |
| 493 | 10년 전 | 12655 | ||
| 492 | 10년 전 | 11279 | ||
| 491 |
고등동물고등어
|
10년 전 | 10618 | |
| 490 | 10년 전 | 9498 | ||
| 489 | 10년 전 | 16207 | ||
| 488 |
saesini
|
10년 전 | 8632 | |
| 487 | 10년 전 | 14357 | ||
| 486 | 10년 전 | 8061 | ||
| 485 | 10년 전 | 9634 | ||
| 484 |
|
10년 전 | 6704 | |
| 483 |
untitled
|
10년 전 | 9984 | |
| 482 | 10년 전 | 8279 | ||
| 481 | 10년 전 | 16277 | ||
| 480 | 10년 전 | 10373 | ||
| 479 |
|
10년 전 | 8105 | |
| 478 | 10년 전 | 12752 | ||
| 477 | 10년 전 | 6362 | ||
| 476 | 10년 전 | 8344 | ||
| 475 |
wonilone
|
10년 전 | 7320 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기