jquery .click函数的基本延迟 [英] basic delay on jquery .click function

查看:123
本文介绍了jquery .click函数的基本延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我拥有所有这些工具中最基本的jquery函数,但是在文档中找不到方法在说1500毫秒后触发此click函数的内容:

I have the most basic jquery function of them all, but I couldn't find a way in the documentation to trigger the contents of this click function after say 1500 milliseconds:

$('.masonryRecall').click(function(){
  $('#mainContent').masonry();
 });

P.S.刚注意到.delay函数jquery 1.4,但是,我使用的是1.3版.我不知道更新它是否会干扰我目前拥有的其他任何JavaScript.

P.S. just noticed the .delay function jquery 1.4, although, I am using version 1.3. I don't know whether updating this would interfere with any of the other javascript I currently have.

推荐答案

您可以使用

You can do it with regular javascript using setTimeout().

$('.masonryRecall').click(function(){
        setTimeout("$('#mainContent').masonry()", 1500);
    });

这篇关于jquery .click函数的基本延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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