footer.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <footer class="footer">
  2. <p class="return">回到顶部<span class="glyphicon glyphicon-menu-up"></span></p>
  3. <ul id="accordion" class="accordion">
  4. <li>
  5. <div class="link">服务案例<i class="glyphicon glyphicon-menu-right"></i></div>
  6. </li>
  7. <li>
  8. <div class="link">产品中心<i class="glyphicon glyphicon-menu-right"></i></div>
  9. </li>
  10. <li>
  11. <div class="link">媒体中心<i class="glyphicon glyphicon-menu-right"></i></div>
  12. </li>
  13. <li>
  14. <div class="link"><a href="operating_center.html" style="color: #a5a5a5;">运营中心</a></div>
  15. </li>
  16. <li>
  17. <div class="link">服务与支持<i class="glyphicon glyphicon-menu-right"></i></div>
  18. </li>
  19. <li>
  20. <div class="link"><a href="about_us.html" style="color: #a5a5a5;">关于我们</a></div>
  21. </li>
  22. </ul>
  23. <div class="footer_qrcode">
  24. <img src="img/weixin_qrcode.png" alt="" />
  25. <p>
  26. <a>关注公众号</a>
  27. <a>了解更多资讯</a>
  28. </p>
  29. <hr />
  30. <span>© 2012-2020 版权所有</span>
  31. <span>****科技有限公司<a style="color: #ffffff" href="http://www.beian.miit.gov.cn"
  32. target="_blank">&nbsp;&nbsp;沪ICP备16004537号-1</a></span>
  33. </div>
  34. </footer>
  35. <script type="text/javascript">
  36. $(function () {
  37. var Accordion = function (el, multiple) {
  38. this.el = el || {};
  39. this.multiple = multiple || false;
  40. var links = this.el.find('.link');
  41. links.on('click', { el: this.el, multiple: this.multiple }, this.dropdown)
  42. }
  43. Accordion.prototype.dropdown = function (e) {
  44. var $el = e.data.el;
  45. $this = $(this),
  46. $next = $this.next();
  47. $next.slideToggle();
  48. $this.parent().toggleClass('open');
  49. if (!e.data.multiple) {
  50. $el.find('.submenu').not($next).slideUp().parent().removeClass('open');
  51. };
  52. }
  53. var accordion = new Accordion($('#accordion'), false);
  54. });
  55. //滑动高度监测
  56. var scrollTop;
  57. var timer = null;
  58. //监测当前屏幕高度
  59. window.onscroll = function () {
  60. scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
  61. return scrollTop;
  62. }
  63. //点击返回顶部
  64. $('.return').click(function () {
  65. clearInterval(timer);
  66. timer = setInterval(function () {
  67. var now = scrollTop;
  68. var speed = (0 - now) / 10;
  69. speed = speed > 0 ? Math.ceil(speed) : Math.floor(speed);
  70. if (scrollTop == 0) {
  71. clearInterval(timer);
  72. }
  73. document.documentElement.scrollTop = scrollTop + speed;
  74. document.body.scrollTop = scrollTop + speed;
  75. }, 35)
  76. })
  77. </script>