【问题标题】:How can I add a url redirect to this jQuery Countdown如何将 url 重定向添加到此 jQuery Countdown
【发布时间】:2012-03-02 13:10:08
【问题描述】:

我需要为这个编码添加一个 url 重定向

这是 jquery 代码

我需要它在倒计时归零时重定向

$(function(){
    $('#countdown_dashboard').countDown({
        targetDate: {
            'day':   27,
            'month': 1,
            'year':  2012,
            'hour':  0,
            'min':   0,
            'sec':   0
        }
    });
})

【问题讨论】:

  • 什么是countDown?插件?

标签: jquery url redirect countdown


【解决方案1】:
 $(function(){
 $('#countdown_dashboard').countDown({
  targetDate: {
         'day':     27,
         'month':   1,
         'year':    2012,
         'hour':    0,
         'min':     0,
         'sec':     0
            },
   onComplete: function() { window.location.href = 'some URL'; }   
   });
 });

http://www.littlewebthings.com/projects/countdown/example.php?e=on_complete

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-07-08
    • 1970-01-01
    • 2010-12-15
    • 2018-06-11
    • 1970-01-01
    • 2021-08-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多