jQuery大于非选择器?

1 jquery for-loop

我想弄清楚如何greater than在没有选择器的jQuery中使用?

$('.myClass').gt(2).css('width','100px');

我的问题是我在一个for语句中使用它,我不能使用选择器:gt().

那我该怎么做呢?

Cok*_*god 5

使用切片方法:

myItems.slice(2).css('width', '100px');
Run Code Online (Sandbox Code Playgroud)