zoukankan      html  css  js  c++  java
  • 一个网站顶部广告

    前两天广告部的同事要上一个广告,一说要求 都写过N次了 干脆写一个固定下来 省的每次都写一遍

     打开首页后广告拉下,显示一段时间后自动卷上去 再打个XX 可以关闭就行了 

    具体代码如下:

    $(function(){
                
    var projad={
                    adtimer:
    false,
                    playtim:
    10000,//显示时间(ms)按需调整
                    projdiv:$("#projection"),
                    showprj:
    function(){
                        projad.projdiv.slideDown(
    1000);
                        projad.sethide();
                    },
                    hideprj:
    function(){
                        projad.projdiv.slideUp(
    800);
                        projad.clearhide();
                    },
                    sethide:
    function(){
                        projad.adtimer
    =setTimeout(projad.hideprj,projad.playtim);
                    },
                    clearhide:
    function(){
                        
    if(projad.adtimer){
                            clearTimeout(projad.adtimer);
                            projad.adtimer
    =false;
                        }
                    }
                }
                projad.showprj();
                
    //projad.projdiv.hover(function(){projad.clearhide();},function(){projad.sethide();})
                $("#xcls").click(function(){
                    projad.hideprj();
                })
                
            })

    例子见:

    http://nba.titan24.com/focus/kikx/topad_demo.html 

  • 相关阅读:
    课程设置
    专家答疑:ASP.NET MVC与WebForm的区别
    PHP环境的搭建之利器 – APMServ
    office access vs mysql
    IBM Tivoli Identity Manager 5.1 Basic Implementation
    Windows安全认证是如何进行的?
    landesk桌面管理
    转:HBase在淘宝的应用和优化小结
    Workstation ITbased Security Best Practice Configurations
    Scale Your Applications with Component Load Balancing (cont'd)
  • 原文地址:https://www.cnblogs.com/trance/p/1671162.html
Copyright © 2011-2022 走看看