欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jquery插件jquery倒計(jì)時(shí)插件分享

 更新時(shí)間:2013年12月27日 09:20:00   作者:  
jquery倒計(jì)時(shí)插件分享,大家參考使用吧

復(fù)制代碼 代碼如下:

$(document).ready(function () {
            /* 延遲函數(shù)  */
            jQuery.fn.delay = function (time, func) {
                return this.each(function () {
                    setTimeout(func, time);
                });
            };
            jQuery.fn.countDown = function (settings, to) {
                settings = jQuery.extend({
                    startFontSize: '36px',
                    endFontSize: '12px',
                    duration: 1000,
                    startNumber: 10,
                    endNumber: 0,
                    callBack: function () { }
                }, settings);
                return this.each(function () {
                    if (!to && to != settings.endNumber) { to = settings.startNumber; }
                    //設(shè)定倒計(jì)時(shí)開(kāi)始的號(hào)碼
                    $(this).text(to).css('fontSize', settings.startFontSize);
                    //頁(yè)面動(dòng)畫(huà)
                    $(this).animate({
                        'fontSize': settings.endFontSize
                    }, settings.duration, '', function () {
                        if (to > settings.endNumber + 1) {
                            $(this).css('fontSize', settings.startFontSize).text(to - 1).countDown(settings, to - 1);
                        }
                        else {
                            settings.callBack(this);
                        }
                    });
                });
            };
            //使用
            $('#countdown').countDown({
                startNumber: 10,
                callBack: function (me) {
                    $(me).text('All done! This is where you give the reward!').css('color', '#090');
                }
            });
        });

相關(guān)文章

最新評(píng)論