Board logo

標題: [操作疑難] Show/hide a div with mouseover and mouseout on <li> [打印本頁]

作者: carlkyo    時間: 2013-12-9 19:13     標題: Show/hide a div with mouseover and mouseout on <li>

Show/hide a div with mouseover and mouseout on <li>
http://jsfiddle.net/yBs8F/
請問各位CHING
DEMO1冇問題
但DEMO2唔WORK
邊度錯左
many thanks
作者: Jackass_TMxCK    時間: 2013-12-9 20:45

本帖最後由 Jackass_TMxCK 於 2013-12-9 20:48 編輯

replacing this JS with followings:
$(document).ready(function () {
        $('li').mouseover(function (e) {
                e.stopPropagation();
                $(this).find('>.actions').css('visibility', 'visible');
                $(this).find('.btn-group').css('visibility', 'visible');
        });
        $('li').mouseout(function (e) {
                e.stopPropagation();
                $(this).find('>.actions').css('visibility', 'hidden');
                $(this).find('.btn-group').css('visibility', 'hidden');
        });
   
    $('.actions').css('visibility', 'hidden');
    $('.btn-group').css('visibility', 'hidden');
});
作者: carlkyo    時間: 2013-12-9 20:49

replacing this JS with followings:
$(document).ready(function () {
        $('li').mouseover(functio ...
Jackass_TMxCK 發表於 2013-12-9 20:45



    many thanks
作者: 杜龍    時間: 2013-12-10 13:31

點解唔用css:hover....





歡迎光臨 電腦領域 HKEPC Hardware (https://h0.hkepc.com/forum/) Powered by Discuz! 7.2