초

퀵메뉴 소스수정..

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

참고 홈페이지 퀵메뉴입니다.
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건
+
제목 글쓴이 날짜 조회
12-04-24 조회 2,677
12-04-24 조회 2,741
12-04-24 조회 3,902
12-04-24 조회 3,031
12-04-24 조회 3,391
12-04-24 조회 2,782
12-04-24 조회 3,293
12-04-24 조회 2,829
12-04-24 조회 2,805
12-04-24 조회 2,979
12-04-24 조회 4,680
12-04-23 조회 3,132
12-04-23 조회 3,935
12-04-23 조회 2,756
12-04-23 조회 2,751
12-04-23 조회 3,029
12-04-23 조회 2,670
12-04-23 조회 3,706
12-04-23 조회 2,601
12-04-23 조회 2,669
12-04-23 조회 3,030
12-04-23 조회 2,830
12-04-23 조회 2,677
12-04-23 조회 2,871
12-04-23 조회 2,879
12-04-23 조회 2,633
12-04-23 조회 4,623
12-04-23 조회 3,653
12-04-23 조회 3,521
12-04-22 조회 2,658
12-04-22 조회 2,618
12-04-22 조회 2,695
12-04-22 조회 2,911
12-04-22 조회 2,711
12-04-22 조회 3,322
12-04-22 조회 3,365
12-04-22 조회 2,954
12-04-21 조회 3,214
12-04-21 조회 4,161
12-04-21 조회 4,592
12-04-21 조회 7,929
12-04-21 조회 2,734
12-04-21 조회 3,127
12-04-21 조회 2,627
12-04-21 조회 2,869
12-04-20 조회 3,673
12-04-20 조회 3,180
12-04-20 조회 2,846
12-04-20 조회 2,931
12-04-20 조회 2,733
12-04-20 조회 2,858
12-04-20 조회 3,993
12-04-20 조회 4,206
12-04-20 조회 3,065
12-04-20 조회 3,320
12-04-20 조회 4,418
12-04-20 조회 3,360
12-04-19 조회 3,417
12-04-19 조회 3,055
12-04-18 조회 4,484
12-04-18 조회 2,947
12-04-18 조회 3,171
12-04-17 조회 3,443
12-04-17 조회 3,608
12-04-17 조회 5,204
12-04-17 조회 5,510
12-04-17 조회 2,945
12-04-17 조회 3,452
12-04-16 조회 2,916
12-04-16 조회 3,646
12-04-16 조회 3,345
12-04-16 조회 3,227
12-04-16 조회 3,636
12-04-16 조회 2,870
12-04-16 조회 4,451
12-04-15 조회 4,022
12-04-14 조회 3,720
12-04-14 조회 3,100
12-04-14 조회 3,778
12-04-14 조회 3,825
12-04-13 조회 3,461
12-04-13 조회 4,658
12-04-13 조회 3,251
12-04-13 조회 2,982
12-04-13 조회 3,194
12-04-13 조회 6,285
12-04-12 조회 4,903
12-04-12 조회 3,424
12-04-11 조회 3,646
12-04-10 조회 5,131
12-04-10 조회 4,084
12-04-10 조회 3,196
12-04-09 조회 3,245
12-04-09 조회 4,825
12-04-09 조회 3,173
12-04-08 조회 3,503
12-04-07 조회 2,836
12-04-06 조회 2,986
12-04-06 조회 3,728
12-04-06 조회 5,526