Authored by xuqi

service of me pages hover

@@ -86,8 +86,8 @@ @@ -86,8 +86,8 @@
86 {{!-- 在线客服和返回顶部 --}} 86 {{!-- 在线客服和返回顶部 --}}
87 <div class="service-top"> 87 <div class="service-top">
88 <a class="service" href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=703953&configID=149819&jid=1099911094" target="_blank"> 88 <a class="service" href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=703953&configID=149819&jid=1099911094" target="_blank">
89 - <span class="iconfont">&#xe61c;</span>  
90 - <span class="hover-text hide">在线<br>客服</span> 89 + <span class="iconfont hide">&#xe61c;</span>
  90 + <span class="hover-text">在线<br>客服</span>
91 </a> 91 </a>
92 <div class="return-top hide"> 92 <div class="return-top hide">
93 <span class="iconfont bold">&#xe617;</span> 93 <span class="iconfont bold">&#xe617;</span>
@@ -25,11 +25,11 @@ require('../common/return-top'); // return-top @@ -25,11 +25,11 @@ require('../common/return-top'); // return-top
25 lazyLoad($('.banner-img')); 25 lazyLoad($('.banner-img'));
26 26
27 // 浮动在线客服和返回顶部的鼠标移入移出切换效果 27 // 浮动在线客服和返回顶部的鼠标移入移出切换效果
28 -$('.service, .return-top').hover(function() {  
29 - $(this).find('.iconfont').addClass('hide').end().find('.hover-text').removeClass('hide');  
30 -}, function() {  
31 - $(this).find('.iconfont').removeClass('hide').end().find('.hover-text').addClass('hide');  
32 -}); 28 +function toggleShow(e) {
  29 + $(e.target).find('span').toggleClass('hide');
  30 +};
  31 +
  32 +$('.service, .return-top').hover(toggleShow, toggleShow);
33 33
34 // repos service-return when window resize 34 // repos service-return when window resize
35 $(window).resize(reposServiceTop); 35 $(window).resize(reposServiceTop);