The div layer automatically disappears after 2 seconds.
The following is a piece of code about jquery's implementation code that pops up the div layer and disappears automatically. The Code is as follows:
Var HuiFang = {m_tishi: null, // The global variable determines whether a div exists. // The system prompts the div to automatically disable Funtishi: function (content, url) {if (HuiFang. m_tishi = null) {HuiFang. m_tishi = '<div class = "xiaoxikuang none" id = "app_tishi" style = "z-index: 9999; left: 15%; width: 70%; position: fixed; background: none; bottom: 10%; "> <p class =" app_tishi "style =" background: none repeat scroll 0 0 0 #000; border-radius: 30px; color: # fff; margin: 0 auto; padding: 1.5em; text-align: center; width: 70%; opacity: 0.8; font-family: Microsoft YaHei; letter-spacing: 1px; font-size: 1.5em; "> </p> </div> '; $ (document. body ). append (HuiFang. m_tishi) ;}$ ("# app_tishi "). show (); $ (". app_tishi "pai.html (content); if (url) {window. setTimeout ("location. href = '"+ url +"' ", 1500);} else {setTimeout ('$ (" # app_tishi "). fadeOut () ', 1500 );}},}
Usage:
HuiFang. Funtishi ("enter a name. ");
The above is the jQuery pop-up div layer that has automatically disappeared in 2 seconds. I hope it will be helpful to you. If you have any questions, please leave a message for me, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!