HTML/CSS: Make a div “invisible” to clicks?

后端 未结 5 1053
清歌不尽
清歌不尽 2020-11-28 06:37

For various reasons, I need to put a (mostly) transparent

over some text. However, this means that the text can\'t be clicked (eg, to click links or
5条回答
  •  再見小時候
    2020-11-28 06:54

    Use this jQuery

    $("div").click(function(e){e.preventDefault();});
    

    replace "div" with the ID or element

提交回复
热议问题