초

퀵메뉴 소스수정..

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

참고 홈페이지 퀵메뉴입니다.
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-23 조회 4,102
11-12-23 조회 3,044
11-12-23 조회 4,870
11-12-23 조회 4,442
11-12-23 조회 2,797
11-12-23 조회 8,127
11-12-22 조회 3,117
11-12-22 조회 3,857
11-12-22 조회 3,611
11-12-22 조회 3,520
11-12-22 조회 3,716
11-12-21 조회 3,566
11-12-21 조회 3,341
11-12-21 조회 3,639
11-12-21 조회 4,028
11-12-21 조회 3,053
11-12-21 조회 3,554
11-12-21 조회 4,482
11-12-21 조회 4,300
11-12-21 조회 3,331
11-12-20 조회 3,798
11-12-19 조회 6,299
11-12-19 조회 2,975
11-12-19 조회 5,054
11-12-17 조회 3,905
11-12-17 조회 4,283
11-12-17 조회 3,574
11-12-16 조회 3,177
11-12-16 조회 3,338
11-12-15 조회 3,391
11-12-15 조회 3,501
11-12-15 조회 4,307
11-12-15 조회 5,609
11-12-15 조회 4,595
11-12-15 조회 3,267
11-12-15 조회 4,036
11-12-15 조회 4,211
11-12-14 조회 2,967
11-12-14 조회 4,395
11-12-14 조회 5,641
11-12-13 조회 4,203
11-12-13 조회 5,098
11-12-13 조회 6,118
11-12-13 조회 6,408
11-12-13 조회 4,814
11-12-12 조회 3,317
11-12-12 조회 3,623
11-12-12 조회 6,294
11-12-12 조회 4,688
11-12-12 조회 3,821
11-12-12 조회 6,186
11-12-11 조회 4,705
11-12-10 조회 2,822
11-12-10 조회 4,766
11-12-09 조회 2,868
11-12-09 조회 3,274
11-12-09 조회 4,199
11-12-09 조회 3,813
11-12-09 조회 4,021
11-12-09 조회 3,566
11-12-09 조회 4,524
11-12-09 조회 3,205
11-12-09 조회 3,351
11-12-09 조회 3,028
11-12-09 조회 3,844
11-12-08 조회 3,615
11-12-08 조회 3,564
11-12-08 조회 7,880
11-12-08 조회 4,186
11-12-08 조회 3,675
11-12-08 조회 2,919
11-12-08 조회 1.2만
11-12-08 조회 4,004
11-12-07 조회 2,874
11-12-07 조회 2,910
11-12-07 조회 3,954
11-12-07 조회 4,553
11-12-07 조회 4,019
11-12-07 조회 3,112
11-12-07 조회 4,439
11-12-06 조회 4,343
11-12-06 조회 5,685
11-12-06 조회 3,742
11-12-06 조회 3,673
11-12-05 조회 3,090
11-12-05 조회 3,387
11-12-05 조회 4,619
11-12-05 조회 3,365
11-12-05 조회 4,977
11-12-05 조회 2,926
11-12-05 조회 6,001
11-12-05 조회 3,124
11-12-05 조회 4,453
11-12-04 조회 5,770
11-12-04 조회 3,014
11-12-04 조회 3,379
11-12-03 조회 3,690
11-12-03 조회 3,053
11-12-03 조회 3,646
11-12-03 조회 3,550