jQuery: append() object, remove() it with delay()

前端 未结 4 1496
被撕碎了的回忆
被撕碎了的回忆 2020-12-01 06:09

what\'s wrong with that?

$(\'body\').append(\"
Upload successful!
\"); $(\'.message\').delay(2000).remove(); <
4条回答
  •  眼角桃花
    2020-12-01 06:51

    And just for kicks, you could do the following, using delay:

    $('body').append("
    Upload successful!
    "); $('.message').show('fast').delay(2000).hide('fast') $('.message').remove();

提交回复
热议问题