disable all page elements with modal feature using jquery

前端 未结 4 1698
萌比男神i
萌比男神i 2020-12-08 08:41

I wish to disable all page elements upon an action. Like the modal feature that is in the JQuery UI.

Like on an ajax action.. I wish to show a notif

4条回答
  •  [愿得一人]
    2020-12-08 09:25

    Try adding a style of "pointer-events: none;" to the body. To remove it use pointer-events: auto;

    More info here https://css-tricks.com/almanac/properties/p/pointer-events/ Though there may be issues with earlier browsers not supporting it

提交回复
热议问题