Result
jQuery
$(document).ready(function() {
//queue()で処理を溜めてdequeue()で実行。3秒経ったらfadeOut()
$("#timeout").fadeIn().queue(function() {
setTimeout(function(){$("#timeout").dequeue();
}, 3000);
});
$("#timeout").fadeOut();
});
css
#timeout{
position:absolute;
top:30px;
left:50px;
padding:20px;
border:1px solid #ddd;
background:#eee;
}
html
<div id="timeout"> <p>Time out</p> </div>
[myphp file=’jquery-other-snippets’]
