초

퀵메뉴 소스수정..

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

참고 홈페이지 퀵메뉴입니다.
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건
+
제목 글쓴이 날짜 조회
13-03-03 조회 6,264
13-03-01 조회 5,593
13-03-01 조회 8,335
13-03-01 조회 6,337
13-02-26 조회 3,940
13-02-26 조회 3,894
13-02-26 조회 4,781
13-02-24 조회 8,192
13-02-24 조회 4,271
13-02-24 조회 3,516
13-02-24 조회 5,331
13-02-24 조회 5,324
13-02-24 조회 4,385
13-02-24 조회 5,725
13-02-24 조회 9,416
13-02-14 조회 5,143
13-02-13 조회 9,074
13-01-29 조회 7,710
13-01-24 조회 5,049
13-01-24 조회 4,926
13-01-17 조회 4,347
13-01-16 조회 4,371
13-01-08 조회 4,420
12-12-27 조회 4,094
12-12-20 조회 1.1만
12-12-20 조회 3,406
12-12-06 조회 4,403
12-12-01 조회 4,172
12-11-28 조회 5,730
12-11-25 조회 5,438
12-10-20 조회 4,689
12-10-03 조회 4,850
12-09-26 조회 5,015
12-09-15 조회 8,460
12-09-14 조회 5,475
12-09-11 조회 3,987
12-09-10 조회 3,991
12-09-05 조회 8,875
12-08-29 조회 4,685
12-08-26 조회 3,822
12-08-23 조회 3,509
12-08-22 조회 3,598
12-08-22 조회 4,407
12-08-21 조회 3,555
12-08-20 조회 3,480
12-08-20 조회 9,287
12-08-15 조회 4,404
12-08-13 조회 3,314
12-08-11 조회 4,735
12-08-05 조회 4,594
12-08-03 조회 3,368
12-08-03 조회 4,059
12-08-02 조회 5,044
12-07-29 조회 4,160
12-07-26 조회 3,732
12-07-26 조회 3,604
12-07-22 조회 3,518
12-07-20 조회 3,355
12-07-19 조회 4,213
12-07-19 조회 3,470
12-07-16 조회 3,579
12-07-16 조회 4,509
12-07-15 조회 3,583
12-07-12 조회 7,410
12-07-12 조회 5,050
12-07-11 조회 3,096
12-07-09 조회 3,259
12-07-05 조회 3,879
12-07-04 조회 4,450
12-07-04 조회 3,844
12-07-04 조회 4,376
12-06-29 조회 3,843
12-06-27 조회 3,426
12-06-24 조회 3,903
12-06-22 조회 4,219
12-06-22 조회 8,621
12-06-22 조회 3,283
12-06-21 조회 3,308
12-06-17 조회 3,947
12-06-14 조회 4,045
12-06-14 조회 3,331
12-06-08 조회 4,470
12-06-06 조회 3,432
12-06-04 조회 4,197
12-05-26 조회 5,002
12-05-26 조회 3,953
12-05-25 조회 3,251
12-05-24 조회 3,356
12-05-22 조회 3,407
12-05-20 조회 3,031
12-05-16 조회 3,161
12-05-15 조회 3,555
12-05-10 조회 3,976
12-05-08 조회 3,515
12-05-04 조회 3,362
12-05-03 조회 4,312
12-05-02 조회 3,446
12-05-02 조회 3,213
12-05-02 조회 3,316
12-04-26 조회 3,475