웹 페이지 오른쪽 슬라이딩 블록

7250 단어 웹 페이지
/* */
        $(".side ul li").hover(function(){
            var selected = $(this).attr("id");
            if(selected != null && selected == "tel"){
                $(this).find(".sidebox").stop().animate({"width":"174px"},200).css({"opacity":"1","filter":"Alpha(opacity=100)","background":"#ae1c1c"})
            }else {
               $(this).find(".sidebox").stop().animate({"width":"124px"},200).css({"opacity":"1","filter":"Alpha(opacity=100)","background":"#ae1c1c"})
            }
        },function(){                           
       $(this).find(".sidebox").stop().animate({"width":"54px"},200).css({"opacity":"0.8","filter":"Alpha(opacity=80)","background":"#000"}) });


  function goPageTop(){     $('html,body').animate({'scrollTop':0},600);//맨 위로 굴러가는 시간, 작을수록 굴러가는 속도가 빨라요~}
  
<!--   -->
<div class="side">
    <ul>
        <li>
            <a href="" target="_blank">
                <div class="sidebox"><img src="/img/icon/side/qq.png"> </div>
            </a>
        </li>
        <li id="tel">
            <a href="#hotline">
                <div class="sidebox" ><img src="/img/icon/side/tel.png"><strong>400 720 7200</strong></div>
            </a>
        </li>
        <li>
            <a href="">
                <div class="sidebox"><img src="/img/icon/side/help_center.png"> </div>
            </a>
        </li>
        <li>
            <a href="javascript:goPageTop();" class="sidetop">
                <div class="sidebox" ><img src="/img/icon/side/gotop.png"> </div>
            </a>
        </li>
    </ul>
</div>

좋은 웹페이지 즐겨찾기