초

퀵메뉴 소스수정..

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

참고 홈페이지 퀵메뉴입니다.
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-11-16 조회 3,551
11-11-15 조회 2,665
11-11-15 조회 3,299
11-11-15 조회 2,749
11-11-14 조회 2,850
11-11-14 조회 3,799
11-11-14 조회 3,605
11-11-14 조회 4,287
11-11-14 조회 2,878
11-11-14 조회 2,781
11-11-13 조회 4,070
11-11-12 조회 2,707
11-11-12 조회 2,837
11-11-12 조회 4,065
11-11-11 조회 2,970
11-11-11 조회 2,913
11-11-11 조회 2,586
11-11-11 조회 2,905
11-11-11 조회 4,049
11-11-11 조회 2,512
11-11-11 조회 4,755
11-11-11 조회 2,781
11-11-11 조회 2,601
11-11-11 조회 2,468
11-11-11 조회 2,881
11-11-11 조회 2,661
11-11-11 조회 2,661
11-11-10 조회 3,107
11-11-10 조회 2,570
11-11-10 조회 3,201
11-11-10 조회 3,764
11-11-10 조회 2,458
11-11-10 조회 2,591
11-11-10 조회 2,421
11-11-09 조회 2,626
11-11-09 조회 3,350
11-11-09 조회 2,828
11-11-09 조회 2,972
11-11-08 조회 2,727
11-11-08 조회 3,060
11-11-08 조회 2,383
11-11-08 조회 3,341
11-11-08 조회 2,630
11-11-08 조회 3,408
11-11-06 조회 1만
11-11-06 조회 2,698
11-11-06 조회 3,698
11-11-06 조회 3,501
11-11-06 조회 3,806
11-11-06 조회 3,991
11-11-05 조회 2,534
11-11-05 조회 2,698
11-11-04 조회 8,596
11-11-04 조회 2,643
11-11-04 조회 2,704
11-11-04 조회 3,714
11-11-04 조회 2,606
11-11-04 조회 2,775
11-11-03 조회 4,041
11-11-03 조회 2,720
11-11-03 조회 5,689
11-11-02 조회 5,959
11-11-01 조회 3,250
11-11-01 조회 2,695
11-11-01 조회 3,308
11-11-01 조회 2,591
11-11-01 조회 2,931
11-11-01 조회 2,449
11-11-01 조회 9,468
11-11-01 조회 3,019
11-10-31 조회 2,397
11-10-27 조회 2,657
11-10-26 조회 3,246
11-10-26 조회 2,742
11-10-26 조회 2,593
11-10-26 조회 2,622
11-10-26 조회 2,505
11-10-25 조회 2,570
11-10-25 조회 2,673
11-10-25 조회 2,613
11-10-25 조회 2,598
11-10-24 조회 2,621
11-10-24 조회 2,910
11-10-24 조회 2,920
11-10-23 조회 3,293
11-10-23 조회 2,881
11-10-23 조회 2,782
11-10-21 조회 2,624
11-10-21 조회 2,547
11-10-21 조회 2,539
11-10-21 조회 2,934
11-10-20 조회 4,092
11-10-19 조회 2,592
11-10-19 조회 3,002
11-10-19 조회 4,121
11-10-19 조회 3,276
11-10-19 조회 2,978
11-10-19 조회 6,808
11-10-18 조회 4,143
11-10-18 조회 2,686