Jquery achieves regular display and hiding of div advertisement code

Source: Internet
Author: User

In the html page, we can just put something.

The Code is as follows:

<Div class = "toolbarframe" style = "display: none; "> <a href =" http://www.45it.net "target =" _ blank "> </a> <a class =" bigad_close "> close </a> </div>

 

Jquery code

 

The Code is as follows:

<Script src = "/js/v2/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>

 

Description above

The 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.

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.