초

퀵메뉴 소스수정..

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

참고 홈페이지 퀵메뉴입니다.
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 조회 5,527
12-08-21 조회 3,503
12-08-21 조회 3,584
12-08-05 조회 3,521
12-08-04 조회 4,502
12-07-31 조회 9,383
12-07-26 조회 3,915
12-07-24 조회 3,533
12-07-20 조회 3,547
12-07-15 조회 3,475
12-07-09 조회 4,718
12-07-09 조회 3,428
12-07-09 조회 3,314
12-07-06 조회 4,161
12-07-05 조회 3,257
12-07-05 조회 3,332
12-06-30 조회 3,442
12-06-29 조회 3,239
12-06-26 조회 3,471
12-06-18 조회 3,342
12-06-18 조회 3,475
12-05-31 조회 3,626
12-05-29 조회 4,388
12-05-23 조회 3,464
12-05-22 조회 3,770
12-05-17 조회 4,643
12-05-10 조회 3,511
12-05-06 조회 3,393
12-05-04 조회 3,063
12-04-25 조회 3,560
12-04-21 조회 3,103
12-04-21 조회 4,475
12-04-20 조회 3,572
12-04-10 조회 3,018
12-04-06 조회 2,882
12-04-05 조회 3,221
12-04-05 조회 3,895
12-03-31 조회 3,044
12-03-30 조회 3,107
12-03-29 조회 3,016
12-03-28 조회 3,047
12-03-27 조회 3,347
12-03-26 조회 3,741
12-03-23 조회 2,935
12-03-20 조회 2,995
12-03-12 조회 2,942
12-03-12 조회 3,263
12-03-12 조회 3,168
12-03-12 조회 4,116
12-03-12 조회 5,734
12-03-12 조회 3,715
12-03-12 조회 5,524
12-03-12 조회 3,738
12-03-12 조회 6,142
12-03-06 조회 3,054
12-03-04 조회 4,201
12-03-02 조회 4,112
12-02-16 조회 5,190
12-02-15 조회 4,646
12-02-11 조회 3,013
12-02-08 조회 2,872
12-02-08 조회 3,879
12-02-07 조회 3,277
12-01-30 조회 3,127
12-01-29 조회 3,419
12-01-25 조회 3,406
12-01-19 조회 3,065
12-01-12 조회 3,086
11-12-30 조회 3,710
11-12-29 조회 3,110
11-12-26 조회 3,097
11-12-26 조회 3,000
11-12-17 조회 4,130
11-12-17 조회 3,416
11-12-01 조회 3,082
11-11-19 조회 4,252
11-11-14 조회 4,133
11-11-14 조회 2,749
11-11-10 조회 2,982
11-11-10 조회 3,651
11-10-27 조회 2,523
11-10-26 조회 2,611
11-10-25 조회 2,525
11-10-17 조회 3,699
11-10-10 조회 2,563
11-10-03 조회 2,628
11-09-28 조회 2,490
11-09-28 조회 3,997
11-09-26 조회 2,477
11-09-26 조회 2,590
11-09-25 조회 2,936
11-09-19 조회 6,062
11-09-09 조회 3,025
11-09-08 조회 3,335
11-08-31 조회 3,127
11-08-29 조회 5,113
11-08-25 조회 2,795
11-08-23 조회 2,480
11-08-21 조회 2,496
11-08-19 조회 2,411