초

퀵메뉴 소스수정..

· 2012-01-29 (일) 12:09:45 · 3864
홈페이지에 퀵메뉴를 붙이려 하는데요..
퀵메뉴가 슬라이딩이나 움직임이 없이 딱 고정되서 휠을따라 상하로 움직이는 퀵메뉴를 구현하려 합니다.
소스를 구해서 조금 수정하려 하는데 자바스크립을 잘 다룰줄 몰라 어느부분을 수정해야 할지 모르겠네요..

참고 홈페이지 퀵메뉴입니다.
http://www.carmine-design.com/


아래는 수정해보려는 퀵메뉴 소스인데요..
어느부분을 수정하면 될까요?..ㅜ

<style type="text/css">
<!--
#gotop {position:absolute; z-index:3;left:50%; margin-left:-640px;margin-top: -220px;}
-->
</style>





<script language="javascript">

//<![CDATA[
function initMoving(target, position, topLimit, btmLimit) {
if (!target)
return false;

var obj = target;
obj.initTop = position;
obj.topLimit = topLimit;
obj.bottomLimit = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight) - btmLimit - obj.offsetHeight;

obj.style.position = "absolute";
obj.top = obj.initTop;
obj.left = obj.initLeft;

if (typeof(window.pageYOffset) == "number") { //WebKit
obj.getTop = function() {
return window.pageYOffset;
}
} else if (typeof(document.documentElement.scrollTop) == "number") {
obj.getTop = function() {
return Math.max(document.documentElement.scrollTop, document.body.scrollTop);
}
} else {
obj.getTop = function() {
return 0;
}
}

if (self.innerHeight) { //WebKit
obj.getHeight = function() {
return self.innerHeight;
}
} else if(document.documentElement.clientHeight) {
obj.getHeight = function() {
return document.documentElement.clientHeight;
}
} else {
obj.getHeight = function() {
return 500;
}
}

obj.move = setInterval(function() {
if (obj.initTop > 0) {
pos = obj.getTop() + obj.initTop;
} else {
pos = obj.getTop() + obj.getHeight() + obj.initTop;
//pos = obj.getTop() + obj.getHeight() / 2 - 15;
}

if (pos > obj.bottomLimit)
pos = obj.bottomLimit;
if (pos < obj.topLimit)
pos = obj.topLimit;

interval = obj.top - pos;
obj.top = obj.top - interval / 3;
obj.style.top = obj.top + "px";
}, 30)
}
//]]>


</script>








  <div id="gotop">
        <td><img src="img/top_01.jpg" width="183" height="90" />
  </div>

  <script type="text/javascript">initMoving(document.getElementById("gotop"), 220, 50, 50);</script>
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
11-10-25 조회 2,512
11-10-18 조회 4,058
11-10-18 조회 2,444
11-10-15 조회 3,653
11-10-10 조회 2,719
11-10-02 조회 2,612
11-09-28 조회 2,431
11-09-24 조회 2,522
11-09-22 조회 2,422
11-09-05 조회 2,902
11-08-31 조회 2,290
11-08-31 조회 2,601
11-08-31 조회 2,453
11-08-29 조회 2,989
11-08-28 조회 2,489
11-08-25 조회 2,543
11-08-17 조회 2,257
11-08-16 조회 2,493
11-08-11 조회 2,955
11-08-07 조회 2,659
11-08-03 조회 2,369
11-07-22 조회 2,114
11-07-12 조회 3,332
11-06-27 조회 2,107
11-06-01 조회 1,773
11-05-17 조회 2,571
11-05-01 조회 2,628
11-04-28 조회 2,919
11-04-28 조회 2,979
11-04-13 조회 2,631
11-03-27 조회 2,756
11-03-27 조회 2,630
11-03-14 조회 2,047
11-03-02 조회 2,366
11-03-02 조회 2,600
11-02-27 조회 3,028
11-02-23 조회 2,402
11-02-19 조회 2,545
11-02-14 조회 4,159
11-02-03 조회 2,946
11-01-24 조회 3,894
11-01-04 조회 2,428
10-12-08 조회 5,440
10-11-15 조회 2,447
10-11-14 조회 2,634
10-11-14 조회 3,656
10-10-29 조회 3,715
10-10-19 조회 2,731
10-10-07 조회 2,559
10-10-05 조회 4,474
10-09-18 조회 2,772
10-09-18 조회 2,514
10-09-17 조회 4,920
10-09-15 조회 2,854
10-09-15 조회 2,390
10-09-15 조회 2,877
10-09-15 조회 2,708
10-09-11 조회 4,041
10-09-11 조회 2,535
10-09-11 조회 2,586
10-09-07 조회 3,855
10-09-07 조회 3,397
10-08-29 조회 2,859
10-07-01 조회 3,101
10-06-30 조회 2,507
10-06-30 조회 2,685
10-06-30 조회 3,037
10-06-13 조회 2,073
10-04-15 조회 3,249
10-04-04 조회 3,478
10-02-23 조회 3,589
10-02-09 조회 3,175
10-01-25 조회 2,685
10-01-25 조회 2,788
09-12-27 조회 4,420
09-11-23 조회 3,647
09-11-20 조회 4,890
09-08-30 조회 3,081
09-08-30 조회 3,078
09-08-12 조회 3,044
09-07-22 조회 4,099
09-07-22 조회 4,764
09-07-15 조회 5,918
09-07-11 조회 2,998
09-06-17 조회 2,732
09-06-15 조회 3,023
09-05-29 조회 3,309
09-05-11 조회 5,944
09-05-08 조회 2,704
09-04-30 조회 3,811
09-04-17 조회 3,140
09-04-04 조회 3,321
09-03-05 조회 3,700
09-02-09 조회 3,679
09-02-03 조회 6,178
08-12-27 조회 3,237
08-12-20 조회 4,319
08-11-21 조회 5,279
08-11-14 조회 2,854
08-11-03 조회 3,315