초

퀵메뉴 소스수정..

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

참고 홈페이지 퀵메뉴입니다.
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,187건
+
제목 글쓴이 날짜 조회
11-12-02 조회 3,932
11-12-02 조회 3,649
11-12-02 조회 3,029
11-12-02 조회 3,627
11-12-02 조회 3,623
11-12-02 조회 3,454
11-12-02 조회 2,960
11-12-01 조회 2,878
11-12-01 조회 3,283
11-12-01 조회 2,812
11-12-01 조회 5,523
11-12-01 조회 2,853
11-12-01 조회 3,222
11-12-01 조회 2,853
11-12-01 조회 2,963
11-12-01 조회 4,147
11-12-01 조회 3,261
11-12-01 조회 3,830
11-12-01 조회 2,925
11-11-30 조회 3,543
11-11-30 조회 4,122
11-11-30 조회 3,005
11-11-30 조회 3,448
11-11-30 조회 3,247
11-11-30 조회 3,508
11-11-30 조회 4,904
11-11-30 조회 2,903
11-11-30 조회 7,061
11-11-30 조회 2,856
11-11-29 조회 3,136
11-11-29 조회 2,833
11-11-29 조회 5,801
11-11-29 조회 2,758
11-11-29 조회 3,000
11-11-29 조회 3,411
11-11-28 조회 3,490
11-11-28 조회 2,893
11-11-28 조회 3,460
11-11-28 조회 3,019
11-11-28 조회 2,805
11-11-28 조회 4,679
11-11-28 조회 3,273
11-11-28 조회 2,798
11-11-28 조회 2,764
11-11-27 조회 4,025
11-11-26 조회 3,026
11-11-26 조회 3,469
11-11-26 조회 3,780
11-11-26 조회 4,040
11-11-25 조회 4,351
11-11-25 조회 3,453
11-11-24 조회 2,944
11-11-24 조회 2,839
11-11-24 조회 3,020
11-11-24 조회 3,232
11-11-24 조회 4,767
11-11-24 조회 2,826
11-11-24 조회 3,026
11-11-24 조회 3,129
11-11-24 조회 3,641
11-11-24 조회 2,699
11-11-23 조회 2,613
11-11-23 조회 3,789
11-11-23 조회 3,708
11-11-23 조회 4,051
11-11-22 조회 3,150
11-11-22 조회 2,784
11-11-22 조회 4,044
11-11-22 조회 3,166
11-11-22 조회 3,634
11-11-22 조회 2,829
11-11-22 조회 3,135
11-11-22 조회 3,104
11-11-22 조회 2,995
11-11-22 조회 6,780
11-11-21 조회 2,861
11-11-21 조회 3,012
11-11-21 조회 3,659
11-11-21 조회 2,833
11-11-21 조회 2,514
11-11-21 조회 2,953
11-11-19 조회 4,427
11-11-19 조회 3,888
11-11-19 조회 3,497
11-11-18 조회 5,205
11-11-18 조회 4,038
11-11-18 조회 3,153
11-11-18 조회 3,028
11-11-18 조회 3,202
11-11-17 조회 3,084
11-11-17 조회 2,556
11-11-17 조회 2,922
11-11-17 조회 3,068
11-11-17 조회 4,646
11-11-16 조회 2,905
11-11-16 조회 2,615
11-11-16 조회 2,636
11-11-16 조회 5,010
11-11-16 조회 2,961
11-11-16 조회 3,643