I will share with you my method below:
To show and hide layers in jquery, it is very simple to directly use the hide and show methods. But to set the timing, we need to use the setTimeout function to instantiate it. I will share my method with you below.
Let’s put some random things in the html page
jquery code
<script><br>$(function(){ <br>setTimeout('$( ".toolbarframe").show("slow")',3000);<br> setTimeout('$(".toolbarframe").hide("slow")',13000);<br> $(".bigad_close ").click(function(){<br> $(".toolbarframe").hide("slow");<br>})<br>});<br></script>
A brief introduction to the core implementation code above:
setTimeout('$(".toolbarframe").show ("slow")',3000); After three seconds, the div will slowly be displayed from small to large
setTimeout('$(".toolbarframe").hide("slow")',13000); After ten seconds, it will be displayed again Automatically hide divs from large to small
$(".bigad_close").click(function(){
$(".toolbarframe").hide("slow");
})
This is closed by the user. Click Close to close this layer.
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn