초

퀵메뉴 소스수정..

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

참고 홈페이지 퀵메뉴입니다.
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-10-18 조회 2,659
11-10-18 조회 2,582
11-10-18 조회 2,500
11-10-17 조회 3,870
11-10-17 조회 5,145
11-10-17 조회 2,490
11-10-17 조회 2,768
11-10-17 조회 3,860
11-10-16 조회 2,530
11-10-16 조회 3,176
11-10-16 조회 3,619
11-10-15 조회 1.2만
11-10-15 조회 3,301
11-10-15 조회 3,032
11-10-15 조회 3,716
11-10-15 조회 3,701
11-10-15 조회 2,942
11-10-14 조회 2,968
11-10-13 조회 2,733
11-10-13 조회 4,511
11-10-12 조회 2,538
11-10-12 조회 2,698
11-10-12 조회 3,806
11-10-12 조회 4,101
11-10-12 조회 2,452
11-10-11 조회 2,968
11-10-11 조회 2,615
11-10-11 조회 2,793
11-10-11 조회 3,101
11-10-10 조회 2,769
11-10-10 조회 2,748
11-10-10 조회 2,455
11-10-10 조회 2,449
11-10-10 조회 2,727
11-10-10 조회 2,843
11-10-09 조회 2,654
11-10-08 조회 2,644
11-10-08 조회 4,575
11-10-08 조회 2,929
11-10-07 조회 3,142
11-10-07 조회 2,981
11-10-07 조회 3,475
11-10-06 조회 4,070
11-10-06 조회 2,626
11-10-06 조회 2,714
11-10-06 조회 3,927
11-10-06 조회 2,771
11-10-06 조회 4,309
11-10-06 조회 2,541
11-10-05 조회 2,834
11-10-05 조회 2,961
11-10-05 조회 4,056
11-10-04 조회 2,944
11-10-04 조회 5,388
11-10-04 조회 2,846
11-10-04 조회 2,400
11-10-03 조회 2,781
11-10-02 조회 2,665
11-10-02 조회 3,392
11-10-01 조회 2,422
11-10-01 조회 2,736
11-09-30 조회 2,618
11-09-30 조회 2,721
11-09-30 조회 2,906
11-09-30 조회 2,914
11-09-30 조회 3,679
11-09-30 조회 2,681
11-09-30 조회 3,110
11-09-29 조회 4,932
11-09-29 조회 2,762
11-09-29 조회 2,666
11-09-29 조회 3,069
11-09-28 조회 3,171
11-09-28 조회 3,947
11-09-28 조회 3,146
11-09-28 조회 2,524
11-09-28 조회 2,466
11-09-28 조회 2,342
11-09-28 조회 2,634
11-09-28 조회 4,136
11-09-26 조회 2,554
11-09-26 조회 2,623
11-09-26 조회 2,742
11-09-25 조회 3,083
11-09-24 조회 2,569
11-09-23 조회 2,842
11-09-23 조회 3,431
11-09-23 조회 2,561
11-09-23 조회 2,960
11-09-23 조회 2,303
11-09-22 조회 2,478
11-09-22 조회 2,885
11-09-21 조회 3,253
11-09-21 조회 3,283
11-09-20 조회 2,847
11-09-20 조회 2,680
11-09-20 조회 3,202
11-09-19 조회 2,720
11-09-19 조회 6,008
11-09-19 조회 3,812