Below I will share with you my methods:
In jquery, it is easy to use the hide and show methods directly to display and hide layers, but we need to use the setTimeout function for the instance at a scheduled time, I will share with you my methods below.
In the html page, we can just put something.
Copy codeThe Code is as follows: <div class = "toolbarframe" style = "display: none; "> <a href =" http://www.jb51.net "target =" _ blank "> </a> <a class =" bigad_close "> close </a> </div>
Jquery code
Copy codeThe Code is as follows:
<Script src = "/js/jquery-1.7.2.min.js" language = "javascript" type = "text/javascript"> </script>
<Script>
$ (Function (){
SetTimeout ('$ (". toolbarframe"). show ("slow")', 3000 );
SetTimeout ('$ (". toolbarframe"). hide ("slow")', 13000 );
$ (". Bigad_close"). click (function (){
$ (". Toolbarframe"). hide ("slow ");
})
});
</Script>
Briefly introduce the above core implementation code:
Copy codeThe Code is as follows:
SetTimeout ('$ (". toolbarframe"). show ("slow")', 3000); after three seconds, the div is displayed from small to large.
SetTimeout ('$ (". toolbarframe"). hide ("slow")', 13000); automatically hides the div from large to small in 10 seconds.
$ (". Bigad_close"). click (function (){
$ (". Toolbarframe"). hide ("slow ");
})
You can click Close to close this layer.