그누 스킨중에 홈페이지 가운데 정렬에도 퀵메뉴 잡아주는 소스가 있길레 사용 하려하는데요..
이소스를 사용해보니 약간의 문제(?)가 있어서요...
위치도 거의 딱 잡아주는데 문제는 처음 시작위치와 스크롤될때의 퀵메뉴위치를 잡아주는게 없어서인지 낮은 해상도에서는 홈페이지 아래로 무한 스크롤이 가능하더라고요....
무한 스크롤 안되게 하는 법좀 가르쳐주세요~~
<SCRIPT language=javascript>
//사용함수
function ResetRemocon(){
var DivMovingLayerYFrom, DivMovingLayerYTo, OffsetY, ResetTime;
ResetTime = 50;
if (DivMovingLayerRule == 'center'){
//해상도 기준, 가운데 에서 x만큼 떨어진 곳에 위치
if (navigator.userAgent.toLowerCase().indexOf("gecko") > -1) {
if (document.body.clientWidth < ContentsWidth + 10) {
DivMovingLayer.style.left = parseInt (ContentsWidth / 2, 10) + DivMovingLayerX + 10 + "px";
}
else {
DivMovingLayer.style.left = (DivMovingLayerX + (document.body.clientWidth / 2)) + "px";
}
}
else{
if (document.body.clientWidth < ContentsWidth) {
DivMovingLayer.style.left = parseInt (ContentsWidth / 2, 10) + DivMovingLayerX + "px";
}
else {
DivMovingLayer.style.left = (DivMovingLayerX + (document.body.clientWidth / 2)) + "px";
}
}
}
else if (DivMovingLayerRule == 'left'){
//해상도와 무관, 왼쪽 에서 x만큼 떨어진 곳에 위치
DivMovingLayer.style.left = (DivMovingLayerX) + "px";
}
DivMovingLayerYFrom = parseInt (DivMovingLayer.style.top, 10);
DivMovingLayerYTo = DivMovingLayerY + document.body.scrollTop + 1;
if ( DivMovingLayerYFrom != DivMovingLayerYTo ) {
OffsetY = Math.ceil( Math.abs( DivMovingLayerYTo - DivMovingLayerYFrom ) / 20 );
if ( DivMovingLayerYTo < DivMovingLayerYFrom )
OffsetY = -OffsetY;
DivMovingLayer.style.top = (DivMovingLayerYFrom + OffsetY) + "px";
ResetTime = 10;
}
setTimeout ("ResetRemocon()", ResetTime);
}
function SetRemocon() {
DivMovingLayer.style.display = "block";
DivMovingLayer.style.top = (DivMovingLayerY + document.body.scrollTop + 1) + "px";
ResetRemocon();
return true;
}
function NoneRemocon() {
DivMovingLayer.style.display = "none";
selectBoxVisible();
}
//레이어 디자인부분
document.write("<div id=DivMovingLayer style='position:absolute;left:0px;top:360px; z-index:8;display:none;'>");
document.write("<tr><td align='center'><img src='/2008/images/sub/quick.gif' border='0'></td></tr>");
document.write("</table>");
document.write("</div>");
if (typeof document.body == "undefined")
document.body = document.getElementsByTagName("BODY")[0];
var DivMovingLayer = document.getElementById("DivMovingLayer");
//환경설정
var ContentsWidth = 955;//움직이는 레이어를 제외한 콘텐츠 너비, 가운데 정렬에만 해당, 전체 테이블중 제일큰 테이블 너비
var DivMovingLayerX =387;//레이어가 위치할 레프트 값
var DivMovingLayerY = 360;//레어가 위치할 탑 값
var DivMovingLayerRule = 'center';//center -->가운데 정렬을 기준으로 x만큼, left --> 레프트 정렬을 기준으로 x만큼
//레이어 보이기
//SetRemocon();
window.onload=SetRemocon;
</SCRIPT>
이소스를 사용해보니 약간의 문제(?)가 있어서요...
위치도 거의 딱 잡아주는데 문제는 처음 시작위치와 스크롤될때의 퀵메뉴위치를 잡아주는게 없어서인지 낮은 해상도에서는 홈페이지 아래로 무한 스크롤이 가능하더라고요....
무한 스크롤 안되게 하는 법좀 가르쳐주세요~~
<SCRIPT language=javascript>
//사용함수
function ResetRemocon(){
var DivMovingLayerYFrom, DivMovingLayerYTo, OffsetY, ResetTime;
ResetTime = 50;
if (DivMovingLayerRule == 'center'){
//해상도 기준, 가운데 에서 x만큼 떨어진 곳에 위치
if (navigator.userAgent.toLowerCase().indexOf("gecko") > -1) {
if (document.body.clientWidth < ContentsWidth + 10) {
DivMovingLayer.style.left = parseInt (ContentsWidth / 2, 10) + DivMovingLayerX + 10 + "px";
}
else {
DivMovingLayer.style.left = (DivMovingLayerX + (document.body.clientWidth / 2)) + "px";
}
}
else{
if (document.body.clientWidth < ContentsWidth) {
DivMovingLayer.style.left = parseInt (ContentsWidth / 2, 10) + DivMovingLayerX + "px";
}
else {
DivMovingLayer.style.left = (DivMovingLayerX + (document.body.clientWidth / 2)) + "px";
}
}
}
else if (DivMovingLayerRule == 'left'){
//해상도와 무관, 왼쪽 에서 x만큼 떨어진 곳에 위치
DivMovingLayer.style.left = (DivMovingLayerX) + "px";
}
DivMovingLayerYFrom = parseInt (DivMovingLayer.style.top, 10);
DivMovingLayerYTo = DivMovingLayerY + document.body.scrollTop + 1;
if ( DivMovingLayerYFrom != DivMovingLayerYTo ) {
OffsetY = Math.ceil( Math.abs( DivMovingLayerYTo - DivMovingLayerYFrom ) / 20 );
if ( DivMovingLayerYTo < DivMovingLayerYFrom )
OffsetY = -OffsetY;
DivMovingLayer.style.top = (DivMovingLayerYFrom + OffsetY) + "px";
ResetTime = 10;
}
setTimeout ("ResetRemocon()", ResetTime);
}
function SetRemocon() {
DivMovingLayer.style.display = "block";
DivMovingLayer.style.top = (DivMovingLayerY + document.body.scrollTop + 1) + "px";
ResetRemocon();
return true;
}
function NoneRemocon() {
DivMovingLayer.style.display = "none";
selectBoxVisible();
}
//레이어 디자인부분
document.write("<div id=DivMovingLayer style='position:absolute;left:0px;top:360px; z-index:8;display:none;'>");
document.write("<tr><td align='center'><img src='/2008/images/sub/quick.gif' border='0'></td></tr>");
document.write("</table>");
document.write("</div>");
if (typeof document.body == "undefined")
document.body = document.getElementsByTagName("BODY")[0];
var DivMovingLayer = document.getElementById("DivMovingLayer");
//환경설정
var ContentsWidth = 955;//움직이는 레이어를 제외한 콘텐츠 너비, 가운데 정렬에만 해당, 전체 테이블중 제일큰 테이블 너비
var DivMovingLayerX =387;//레이어가 위치할 레프트 값
var DivMovingLayerY = 360;//레어가 위치할 탑 값
var DivMovingLayerRule = 'center';//center -->가운데 정렬을 기준으로 x만큼, left --> 레프트 정렬을 기준으로 x만큼
//레이어 보이기
//SetRemocon();
window.onload=SetRemocon;
</SCRIPT>
댓글 1개
ACTIVE
17년 전
아이프레임 스크롤 없게 맹글어서 속에 넣어 버리세요..
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1530 |
1111111
|
18년 전 | 1971 | |
| 1529 |
행복속네잎크로버
|
18년 전 | 3475 | |
| 1528 |
행복속네잎크로버
|
18년 전 | 1861 | |
| 1527 |
1111111
|
18년 전 | 7655 | |
| 1526 |
1111111
|
18년 전 | 3290 | |
| 1525 |
행복속네잎크로버
|
18년 전 | 1272 | |
| 1524 |
행복속네잎크로버
|
18년 전 | 2313 | |
| 1523 |
행복속네잎크로버
|
18년 전 | 3516 | |
| 1522 |
행복속네잎크로버
|
18년 전 | 2372 | |
| 1521 |
행복속네잎크로버
|
18년 전 | 2153 | |
| 1520 |
행복속네잎크로버
|
18년 전 | 2767 | |
| 1519 |
행복속네잎크로버
|
18년 전 | 3725 | |
| 1518 |
행복속네잎크로버
|
18년 전 | 3493 | |
| 1517 |
행복속네잎크로버
|
18년 전 | 2575 | |
| 1516 |
행복속네잎크로버
|
18년 전 | 1926 | |
| 1515 |
행복속네잎크로버
|
18년 전 | 1947 | |
| 1514 |
행복속네잎크로버
|
18년 전 | 2517 | |
| 1513 |
행복속네잎크로버
|
18년 전 | 1994 | |
| 1512 | 18년 전 | 2886 | ||
| 1511 | 18년 전 | 1673 | ||
| 1510 | 18년 전 | 2208 | ||
| 1509 | 18년 전 | 1686 | ||
| 1508 | 18년 전 | 2141 | ||
| 1507 | 18년 전 | 2370 | ||
| 1506 | 18년 전 | 2301 | ||
| 1505 | 18년 전 | 2252 | ||
| 1504 | 18년 전 | 2179 | ||
| 1503 | 18년 전 | 3493 | ||
| 1502 | 18년 전 | 1675 | ||
| 1501 | 18년 전 | 3444 | ||
| 1500 | 18년 전 | 2035 | ||
| 1499 | 18년 전 | 5298 | ||
| 1498 | 18년 전 | 2163 | ||
| 1497 |
hsp1980
|
18년 전 | 2349 | |
| 1496 |
hsp1980
|
18년 전 | 1735 | |
| 1495 |
hsp1980
|
18년 전 | 2136 | |
| 1494 |
hsp1980
|
18년 전 | 3651 | |
| 1493 | 18년 전 | 1508 | ||
| 1492 | 18년 전 | 1751 | ||
| 1491 | 18년 전 | 4326 | ||
| 1490 | 18년 전 | 3715 | ||
| 1489 | 18년 전 | 3272 | ||
| 1488 | 18년 전 | 3372 | ||
| 1487 |
mixdesign
|
18년 전 | 3869 | |
| 1486 |
mixdesign
|
18년 전 | 4331 | |
| 1485 | 18년 전 | 4263 | ||
| 1484 | 18년 전 | 2705 | ||
| 1483 |
hsp1980
|
18년 전 | 2317 | |
| 1482 |
hsp1980
|
18년 전 | 3251 | |
| 1481 |
hsp1980
|
18년 전 | 3169 | |
| 1480 |
hsp1980
|
18년 전 | 3323 | |
| 1479 | 18년 전 | 3258 | ||
| 1478 |
|
18년 전 | 4926 | |
| 1477 |
|
18년 전 | 5218 | |
| 1476 | 18년 전 | 3414 | ||
| 1475 |
mixdesign
|
18년 전 | 2725 | |
| 1474 |
mixdesign
|
18년 전 | 2945 | |
| 1473 |
mixdesign
|
18년 전 | 2278 | |
| 1472 |
mixdesign
|
18년 전 | 2088 | |
| 1471 |
mixdesign
|
18년 전 | 2045 | |
| 1470 |
|
18년 전 | 3077 | |
| 1469 |
mixdesign
|
18년 전 | 2363 | |
| 1468 |
mixdesign
|
18년 전 | 2386 | |
| 1467 |
mixdesign
|
18년 전 | 2065 | |
| 1466 |
mixdesign
|
18년 전 | 2433 | |
| 1465 |
mixdesign
|
18년 전 | 3161 | |
| 1464 | 18년 전 | 4089 | ||
| 1463 | 18년 전 | 3387 | ||
| 1462 |
|
18년 전 | 2010 | |
| 1461 |
|
18년 전 | 1948 | |
| 1460 | 18년 전 | 2866 | ||
| 1459 | 18년 전 | 1663 | ||
| 1458 |
|
18년 전 | 2017 | |
| 1457 |
mixdesign
|
18년 전 | 2315 | |
| 1456 |
mixdesign
|
18년 전 | 2176 | |
| 1455 | 18년 전 | 2297 | ||
| 1454 | 18년 전 | 4050 | ||
| 1453 | 18년 전 | 1793 | ||
| 1452 | 18년 전 | 4408 | ||
| 1451 | 18년 전 | 2944 | ||
| 1450 | 18년 전 | 2231 | ||
| 1449 | 18년 전 | 3269 | ||
| 1448 | 18년 전 | 2910 | ||
| 1447 | 18년 전 | 2837 | ||
| 1446 | 18년 전 | 5642 | ||
| 1445 | 18년 전 | 2308 | ||
| 1444 | 18년 전 | 3423 | ||
| 1443 |
|
18년 전 | 3337 | |
| 1442 | 18년 전 | 3721 | ||
| 1441 | 18년 전 | 3272 | ||
| 1440 | 18년 전 | 2454 | ||
| 1439 | 18년 전 | 2102 | ||
| 1438 | 18년 전 | 2554 | ||
| 1437 | 18년 전 | 6121 | ||
| 1436 | 18년 전 | 2742 | ||
| 1435 | 18년 전 | 4548 | ||
| 1434 | 18년 전 | 2052 | ||
| 1433 | 18년 전 | 10054 | ||
| 1432 | 18년 전 | 2498 | ||
| 1431 |
Psychedelico
|
18년 전 | 1562 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기