Jquery实现鼠标hover图片遮罩弹出提示层特效

1、引入JS文件和所需要的样式文件

2、简单的写上以下18行代码就可以实现了

$(document).ready(function() {

    $("div.tip_trigger a.img").hover(function() {

        $(this).parent('div.tip_trigger').css({

            'background': '#8de08b',

            'z-index': '1000'

        });

        $('#h_coolsite .block').show();

        tip = $(this).siblings('.tip');

        tip.show();

    },
    function() {

        $(this).parent('div.tip_trigger').css({

            'background': 'none',
            'z-index': '0'

        });
        $('#h_coolsite .block').hide();

        tip.hide();
    })
19
})

 

posted @ 2015-08-16 16:32  陌钰陌城  Views(261)  Comments(0Edit  收藏  举报