jquery.append()
我使用 ajax 和使用本教程实现了无限滚动。在 ajax 成功时,jquery 将十个<li>
元素附加到<ul>
.
滚动在 Chrome 和 Firefox 上运行正常(可能更快?),但在滚动后会导致 IE 崩溃。关于如何避免崩溃 IE 并可能提高性能的任何建议?
一个<li>
元素包含以下内容:
<div class="post_div" align="left">
<div class="separator_div"></div>
<table class="post_table" align="left">
<tr><!--header e.g title-->
<td class="td_first1"><!--title-->
Title
</td>
<td class="td_second1"><!--blank-->
</td>
</tr>
<tr><!--middle e.g picture-->
<td class="td_first2"><!--picture-->
<img class="img" id="49130" width="480" height="360" src="pic.jpg"></img>
</td>
<td class="td_second2"><!--user,text,vote,share-->
<div class="user_div"><!--avatar+username-->
<img class="uavatar" src="avatar.jpg"></img>
<a href="link/user.php?u=2"><span class="user_span">Jon Doe</span></a>
</div>
<div class="text_div"><!--text-->
some text....
</div>
<div class="vote_div"><!--vote-->
<table align="left" width="220">
3coloumsx2rows table here
</table>
</div>
<div class="share_div"><!--share-->
2 iframes here
</div>
</td>
</tr>
<tr><!--bottom e.g desc-->
<td class="td_first3"><!--desc-->
<div class="desc_div">
onother text here....
</div>
</td>
<td class="td_second3"><!--time+views-->
0 views 1 second ago
</td>
</tr>
</table>
</div>