service of me pages hover
Showing
2 changed files
with
7 additions
and
7 deletions
@@ -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"></span> | ||
90 | - <span class="hover-text hide">在线<br>客服</span> | 89 | + <span class="iconfont hide"></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"></span> | 93 | <span class="iconfont bold"></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); |
-
Please register or login to post a comment