我正在关注帖子上的指示: jQuery fadeIn() different interval with multiple div's
但我就是不能让它工作..有什么问题
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script type="text/javascript">
$('.fadeIn').each(function(){
var $this = $(this);
$this.before('<div> </div>');
setTimeout(function(){
$this.prev().remove();
$this.fadeIn(Math.floor(Math.random()*1500));
}, Math.floor(Math.random()*1500));
}
);
</script>
<style>
.fadeIn{
display: none;
}
</style>
</head>
<body>
<div class="fadeIn">Test 1</div>
<div class="fadeIn">Test 2</div>
<div class="fadeIn">Test 3</div>
<div class="fadeIn">Test 4</div>
<div class="fadeIn">Test 5</div>
<div class="fadeIn">Test 6</div>
</body>
</html>