Click the button to create the mask layer after this button is obscured can also click the solution

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.