This function is very special, I have an essay writing self-help box, pop-up box, the following button although there is a mask layer but still can point, there is a solution is to click on the button immediately after the Click event, after the box is determined and then bound up.
$ (". Regbtn") [0].addeventlistener ("Touchstart", register); function register () {$ (". Regbtn") [0].removeeventlistener ("Touchstart", register); if (execute popup condition) {$ (". Regbtn") [0].removeeventlistener ("Touchstart", register); var alertdiv = $ (' <div id= "AlertDiv" class= "overlay" style= "z-index:99999; left:0px;" ><div class= "Phone-alert" ><div class= "Phone-alert-panel" ><div class= "Phone-alert-content" > Mobile phone number has been registered </div><div class= "Phone-alert-line" ></div><a href= "javascript:void (0);" class= "pbtn "Id=" Confirmtag "> Confirmation </a></div></div></div>"); $ ("Body"). Append (AlertDiv); $ (document). On ("Touchstart", "#confirmTag", function () {$ (". Overlay"). The (function (index, value) {$ (this). Remove () ; $ (". Regbtn") [0].addeventlistener ("Touchstart", register); }); });
Click the button to create the mask layer after this button is obscured can also click the solution