초

퀵메뉴 소스수정..

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

참고 홈페이지 퀵메뉴입니다.
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,188건
+
제목 글쓴이 날짜 조회
12-08-29 조회 4,171
12-08-07 조회 3,833
12-08-03 조회 3,644
12-07-31 조회 3,752
12-07-30 조회 3,705
12-07-16 조회 3,901
12-07-15 조회 3,734
12-07-07 조회 3,597
12-07-06 조회 3,805
12-07-03 조회 3,758
12-06-29 조회 3,370
12-06-22 조회 3,743
12-06-17 조회 4,003
12-05-21 조회 3,924
12-05-02 조회 3,450
12-05-02 조회 4,244
12-05-02 조회 3,367
12-04-30 조회 3,563
12-04-30 조회 3,244
12-03-17 조회 4,110
12-03-10 조회 3,440
12-03-08 조회 3,966
12-03-03 조회 3,680
12-02-27 조회 5,095
12-02-17 조회 4,387
12-02-16 조회 4,672
12-02-03 조회 3,335
12-01-31 조회 3,244
12-01-24 조회 3,242
12-01-17 조회 3,945
12-01-05 조회 3,492
11-12-30 조회 3,224
11-12-23 조회 4,780
11-12-08 조회 3,547
11-12-07 조회 4,506
11-11-27 조회 3,932
11-11-25 조회 4,262
11-11-23 조회 3,704
11-11-22 조회 3,562
11-11-09 조회 3,274
11-10-23 조회 3,212
11-10-19 조회 3,169
11-10-08 조회 2,847
11-10-04 조회 2,848
11-10-04 조회 5,310
11-09-01 조회 4,386
11-08-13 조회 2,562
11-08-06 조회 3,244
11-07-11 조회 3,639
11-06-27 조회 2,997
11-06-21 조회 2,661
11-06-13 조회 2,472
11-06-07 조회 2,481
11-05-26 조회 2,437
11-04-20 조회 2,765
11-03-21 조회 2,864
11-03-18 조회 2,559
11-03-11 조회 2,574
11-02-07 조회 2,406
11-01-18 조회 2,726
11-01-12 조회 2,451
11-01-06 조회 2,539
10-12-10 조회 2,802
10-12-09 조회 2,652
10-12-08 조회 5,083
10-11-29 조회 2,918
10-11-28 조회 2,827
10-11-28 조회 2,657
10-11-19 조회 2,846
10-11-04 조회 2,722
10-10-21 조회 2,447
10-10-19 조회 3,410
10-10-12 조회 2,731
10-10-07 조회 2,565
10-09-30 조회 3,522
10-09-17 조회 3,934
10-09-17 조회 3,877
10-05-31 조회 3,585
09-12-31 조회 3,721
09-07-23 조회 5,046
08-09-16 조회 3,250
08-09-06 조회 2,992
08-09-04 조회 3,412
08-08-16 조회 4,442
08-08-15 조회 3,314
08-08-14 조회 4,529
08-08-12 조회 3,996
08-07-23 조회 2,813
08-07-10 조회 3,763
08-07-04 조회 2,992
08-06-27 조회 7,630
08-06-19 조회 4,939
08-05-27 조회 5,543
08-05-25 조회 5,379
08-05-23 조회 3,456
08-05-23 조회 4,621
08-05-21 조회 4,971
08-05-20 조회 4,085
08-05-20 조회 3,312
08-04-18 조회 4,383