【发布时间】:2011-05-23 07:39:19
【问题描述】:
目前,提要 xml 将返回 20 个项目(子项),每次我只想在单页中显示 10 个项目。 jQuery 的 .each 函数会循环整个文档吗?但我想让它只循环 10 个项目?我需要使用':eq()'吗?
注意:我需要将它用于移动设备环境。
<channel>
<title>Property</title>
<link></link>
<lastbuilddate>Wed, 13 Oct 2010 23:50:51 GMT</lastbuilddate>
<generator>FeedCreator 1.8.0-dev (info@mypapit.net)</generator>
<atom:link href="sample.com" rel="self" type="application/rss+xml"></atom:link>
<item>
<title>sample title</title>
<description>
#cdata-section
</description>
<pubdate>Wed, 08 Dec 2010 23:04:25 GMT</pubdate>
</item>
<item>... ... </item>
<item>... ...</item>
<item>... ... repeat 20 times </item>
<channel>
【问题讨论】:
标签: jquery loops xml-parsing