它我的第一页:滚动到负载DIV重要李例如李类= “importants”
<html>
<head>
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
<body>
<div id="comment"></div>
<script type="text/javascript">
$(document).ready(function() {
$('#comment').load('comment.php');
});
</script>
</body>
<html>
而其comment.php:
<ul id="comments" style="overflow: scroll;">
<li>
<p>comment</p>
</li>
<li>
<p>comment</p>
</li>
<li class="importants">
<p>comment</p>
</li>
<li>
<p>comment</p>
</li>
<li>
<p>comment</p>
</li>
<li>
<p>comment</p>
</li>
</ul>
我想以后ul
滚动到li.importants
加载。 .importants
用滚动显示评论。 (重要评论) 就这样ul
滚动到底!
它没有工作:( –
它滚动到'#comments'结尾我想滚动到'.importants'! –