Catching the Click on DOM/HTML/BODY event on the iPad

前端 未结 7 1030
梦毁少年i
梦毁少年i 2021-02-04 05:55

I\'m using jQuery to detect a click on the DOM - or let\'s every click.

$(document).click(function(){
   alert(\"Click :-)\");
});

This works p

7条回答
  •  逝去的感伤
    2021-02-04 06:24

    You can attach the click listener to the main wrapper element (say div that encloses all the components in your page).

提交回复
热议问题