JQuery mouseover image overlay

前端 未结 3 1465
时光说笑
时光说笑 2021-01-13 13:23

Just wondering how I can get this working 100% correctly. I think I\'m nearly there.

Basically, I have an image & when I mouseover, I want an overlay (which is a

3条回答
  •  旧巷少年郎
    2021-01-13 14:07

    Instead of checking the .company-image element, you're going to want to check the overlay. Try the following.

    $('.company-image').on("mouseover", function () {
        $('.company-image-overlay').show();
    });
    
    $('.company-image-overlay').on("mouseout", function () {
        $('.company-image-overlay').hide();
    });
    

提交回复
热议问题