jQuery Timed Event

后端 未结 3 1458
温柔的废话
温柔的废话 2021-01-04 02:15

Is it possible, using jQuery, to fire off an event to set a div tag\'s text after n. seconds?

Thanks! George

3条回答
  •  爱一瞬间的悲伤
    2021-01-04 02:40

    I've been using the following jQuery plugins below for this. Delay can be used with chained functions, notNow can't.

    Delay

    http://plugins.jquery.com/project/delay

    $('#animate-this').fadeIn().delay(500).fadeOut();
    

    notNow

    http://plugins.jquery.com/project/notNow

    $.notNow(2000, function() { 
        alert('woolsworth');
    });
    

提交回复
热议问题