jQuery API | 返回首页目录 | jQuery API 中英文对照版 |
lt(pos) |
lt(pos)
将匹配的元素集合缩减为给定位置之前的所有元素。这个元素在匹配元素集合中的位置变为0,而长度变成1。 返回值:jQuery 参数:
示例: $("p").lt(1) HTML 代码: <p>This is just a test.</p><p>So is this</p> 结果: [ <p>This is just a test.</p> ] lt( pos ) Reduce the set of matched elements to all elements before a given position. The position of the element in the set of matched elements starts at 0 and goes to length - 1. Return value: jQuery
Example: $("p").lt(1)Before: <p>This is just a test.</p><p>So is this</p> Result: [ <p>This is just a test.</p> ]
|