如何在点击按钮后显示一条消息,然后在30秒后隐藏它?
喜欢:
$('#message').live('click', function() {
$('#sm').hide();
$('#sm').hide().show('slow').html('You have successfully registered');
// how is hide "$('#sm')" after 30 seconds??
});
Run Code Online (Sandbox Code Playgroud)
请举个例子来http://jsfiddle.net/
$('#message').live('click', function() {
$('#sm').hide().show('slow').html('You have successfully registered');
setTimeout(function(){ $('#sm').hide(); }, 30000);
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2136 次 |
| 最近记录: |