Find all link in a div element and disable them all

前端 未结 4 1974
夕颜
夕颜 2021-02-15 16:15

Assume that I have some HTML elements like these :

Click me
4条回答
  •  你的背包
    2021-02-15 16:48

    There are two ways here:

    1) $('#content a').css({"pointer-events":"none"});

    2) $('#content a').click(function(e){ e.preventDefault(); });

提交回复
热议问题