초

퀵메뉴 소스수정..

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

참고 홈페이지 퀵메뉴입니다.
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-05-10 조회 2,992
12-05-10 조회 3,671
12-05-09 조회 4,108
12-05-09 조회 6,360
12-05-08 조회 3,344
12-05-08 조회 3,578
12-05-08 조회 3,198
12-05-08 조회 3,017
12-05-08 조회 3,038
12-05-08 조회 3,423
12-05-08 조회 4,604
12-05-07 조회 3,076
12-05-07 조회 4,283
12-05-07 조회 4,380
12-05-07 조회 4,622
12-05-07 조회 3,298
12-05-06 조회 3,581
12-05-06 조회 3,222
12-05-05 조회 3,290
12-05-05 조회 3,163
12-05-05 조회 3,059
12-05-04 조회 3,220
12-05-04 조회 3,239
12-05-04 조회 3,409
12-05-04 조회 4,128
12-05-03 조회 2,983
12-05-03 조회 3,242
12-05-03 조회 3,080
12-05-03 조회 2,852
12-05-03 조회 3,250
12-05-03 조회 5,257
12-05-03 조회 4,372
12-05-03 조회 3,904
12-05-03 조회 2,957
12-05-02 조회 3,506
12-05-02 조회 4,309
12-05-02 조회 3,424
12-05-02 조회 3,492
12-05-02 조회 3,272
12-05-02 조회 3,372
12-05-02 조회 4,561
12-05-02 조회 2,993
12-05-02 조회 3,257
12-05-01 조회 4,741
12-05-01 조회 3,366
12-04-30 조회 2,881
12-04-30 조회 3,503
12-04-30 조회 3,363
12-04-30 조회 3,341
12-04-30 조회 3,645
12-04-30 조회 4,435
12-04-30 조회 3,313
12-04-28 조회 3,810
12-04-27 조회 2,900
12-04-27 조회 2,949
12-04-27 조회 2,852
12-04-26 조회 2,822
12-04-26 조회 3,169
12-04-26 조회 3,112
12-04-26 조회 2,780
12-04-26 조회 3,080
12-04-26 조회 3,688
12-04-26 조회 2,962
12-04-26 조회 3,620
12-04-26 조회 2,678
12-04-26 조회 3,020
12-04-26 조회 2,755
12-04-26 조회 3,001
12-04-26 조회 2,765
12-04-26 조회 3,196
12-04-26 조회 3,245
12-04-26 조회 3,062
12-04-26 조회 4,929
12-04-26 조회 2,798
12-04-26 조회 3,056
12-04-26 조회 2,884
12-04-26 조회 3,536
12-04-26 조회 3,227
12-04-26 조회 3,920
12-04-26 조회 4,225
12-04-26 조회 3,477
12-04-25 조회 5,456
12-04-25 조회 3,735
12-04-25 조회 3,120
12-04-25 조회 4,517
12-04-25 조회 4,953
12-04-25 조회 2,637
12-04-25 조회 2,952
12-04-25 조회 2,784
12-04-25 조회 2,834
12-04-25 조회 2,802
12-04-25 조회 3,020
12-04-24 조회 4,142
12-04-24 조회 2,652
12-04-24 조회 2,555
12-04-24 조회 2,792
12-04-24 조회 2,726
12-04-24 조회 2,631
12-04-24 조회 3,010
12-04-24 조회 3,028