Pass click events through a DOM layer

后端 未结 4 1992
轻奢々
轻奢々 2021-01-14 09:03

I have a div that is positioned to the bottom of the page and sits above everything on the page. I include a shadow to remove the harsh cutoff of the content below. However,

4条回答
  •  半阙折子戏
    2021-01-14 09:15

    You should implement your own event chain.

    For example:

    $('.shadow').click(function() {
        $('.under-shadow').trigger('click');
    });
    

    Althought it would work, I wouldn't recommend the use of pointer-events:none; since it isn't well supported.

提交回复
热议问题