欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

jquery 实现 鼠标放上去 某一子元素 显示 隐藏 有大用

shiping1 的头像
html代码 
 <li id="h_w_x"><a href="javascript:void(0)" target="_blank"><img src="/imges/headFooter/weixinicon.jpg"  alt="微信" width="16" height="16"  class="w_x_icon"/>微信 </a> |
            <dl class="h_w_x" style="display:none;">
            <dt><img  src="/imges/headFooter/weixin.jpg" alt="微信扫一扫"  width="75" height="75" /></dt>
            <dd>
                  <h2>美联英语微杂志</h2>
                  <span>微信号:meten4u</span> </dd>
            </dl>
        </li>
 

js 代码  
    <script>
        $(document).ready(function () {
            //微信
            $('#h_w_x , #h_down').hover(function () {
                $(this).find('.h_w_x').show();
 
            }, function () {
                    $(this).find('.h_w_x').hide();
 
            });
        });
    </script>
 
 
普通分类: