`delay`不是一个函数(jQuery 1.3) [英] `delay` is not a function (jQuery 1.3)

查看:319
本文介绍了`delay`不是一个函数(jQuery 1.3)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我从Firebug在 $(document).ready 之外(之前)函数中使用jQuery获取的错误,因为它在内联中使用onclick事件:

This is the error i'm getting from Firebug using jQuery in a function outside (and before) the $(document).ready because it is used in a inline onclick event:

$("#_box").fadeIn(500).delay is not a function
$('#_box').fadeIn(500).delay(3000).fadeOut(500);

这是函数:

and this is the function:

function throwBox(message) {
    $('#_box').html(message);
    $('#_box').fadeIn(500).delay(3000).fadeOut(500);
}

不是 delay()一个jQuery函数?
在我的浏览器中发生的事情是, fadeIn()函数被很好地调用,并且框出现,但是站在那里并且不会消失。

Isn't delay() a jQuery function? What happens in my browser is that the fadeIn() function is called nicely and the box appear, but then stands there and doesn't disappear.

推荐答案

我加载了jQuery(1.3)的旧副本而不是新的,而 delay()

I loaded an old copy of jQuery (1.3) instead of the new one while delay() was added in version 1.4 as suggested by Quintin Robinson.

这篇关于`delay`不是一个函数(jQuery 1.3)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆