网页右侧滑动块

/*页面右侧栏动作*/
        $(".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>

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。