记录立邦商城母亲节浇花js效果

news/2024/7/19 15:47:15 标签: js
$(document).ready(function(){
    window.active = false;
    $(".mothersday_button").click(function(){//开始浇花
        active = true;                 
        $(".mothersday_button").hide();
        $(".mothersday_flower").removeClass("cursor_change").addClass("cursor");  //水壶初始状态
        return false;
    });


    $(".mothersday_flower").mousedown(function(){    //水壶倒水状态         
        if( !active ) return;
        $(this).removeClass("cursor").addClass("cursor_change"); 
        });


    $(".mothersday_flower").mouseup(function(){//水壶回到初始状态        
        if( !active ) return;        
        setTimeout(function(){
             $(".mothersday_flower").removeClass("cursor_change").addClass("cursor");              
         }, 100); 
        var test = setTimeout(function(){
            showtime(); //4秒后,花开
        },1500); 
    });


    $(".get_coupon img").click(function(){  //弹框
        $(".get_coupon").remove();         
    });;


    window.showtime = function(){
        $(".success").fadeIn();
         setTimeout(function(){
             $(".success").remove();
         }, 800);
        $(".mothersday_flower").unbind("mousedown").unbind("mouseup");
        $(".mothersday_flower").removeClass("cursor").removeClass("cursor_change");
         $(".mothersday_flower").css('background','url(./images/index/kv/mothersday_flower_change.png)');
        setTimeout(function(){
              $(".get_coupon").fadeIn();
         }, 1500);        
    }
});

http://www.niftyadmin.cn/n/797956.html

相关文章

case用法

一、case在条件中 SELECT email_account FROM mailbox WHERE company_id 2 AND CASE WHEN delete_flag 1 THEN delete_date > 20180328 ELSE delete_date 0 END; 二、case在select后面 SELECT c1.*, case when c2.root_id 0 then (sele…

h5播放音乐

h5音频播放&#xff0c;里面参数可以查看http://www.w3school.com.cn/html5/html_5_audio.asp <audio controls"controls"><source src"song.ogg" type"audio/ogg"><source src"song.mp3" type"audio/mpeg"…

mysql中的INFORMATION_SCHEMA

第一个查询看看库里有多少个表&#xff0c;表名等select * from INFORMATION_SCHEMA.TABLESinformation_schema这张数据表保存了MySQL服务器所有数据库的信息。如数据库名&#xff0c;数据库的表&#xff0c;表栏的数据类型与访问权限等。再简单点&#xff0c;这台MySQL服务器上…

deepin-wine-wechat发送文件图片问题解决

deepin-wine-wechat发送文件图片问题解决 用arch或者manjaro系统的时候&#xff0c;为了使用微信下载了deepin-wine-wechat&#xff0c;但是在发送文件和图片的时候&#xff0c;一直发送不了。搜索之下&#xff0c;发现了解决方法&#xff0c;即替换wine的版本为deepin-wine5&…

ie下select默认样式修改

chrome下浏览&#xff1a; IE和FF下浏览&#xff1a; 使用select做下拉菜单&#xff0c;使用appearance:none;可以消除默认样式&#xff0c;但是要每个浏览器兼容到 .contactus2_con select{ -webkit-appearance: none; -moz-appearance: none; appearance:none; …

制作svg动画

要实现一步一步画出来一个图片&#xff0c;css3做不到吧&#xff0c;除非一张张的图片定时显示。想不到别的招了。现在用的是一个插件&#xff0c;做了一个svg动画。 插件地址&#xff1a;http://lazylinepainter.info/ 先用AI做好路径&#xff0c;保存为svg格式的文件。 使…

Manjaro下安装Mendeley并解决中文无法输入问题

想把Manjaro作为日常系统&#xff0c;但是作为一个科研狗&#xff0c;得使用文献管理软件&#xff0c;而Endnote没有Linux版本&#xff0c;差评&#xff01;尝试过用wine装&#xff0c;但是却出现诸多的如Group的名字显示不了&#xff0c;reference中文乱码等问题&#xff0c;导…

Manjaro更新后Win10引导项消失

Manjaro更新后win10引导项消失 鲁迅说过 &#xff1a;manjaro久不滚&#xff0c;一滚必有妖 好久没有登录manjaro系统&#xff0c;近期登录滚一下&#xff0c;果然出事&#xff1a;windows启动项丢失&#xff0c;开机直接进入了linux系统。 按照之前的经验&#xff0c;重做一下…