EXDestroyer
V2EX  ›  问与答

如何通过 jQuery 以每 n 个为一轮遍历某个数组?

  •  
  •   EXDestroyer · Dec 6, 2014 · 2908 views
    This topic created in 4221 days ago, the information mentioned may be changed or developed.
    用$.each()的话每次都会遍历整个数组中的数据,但是数据太多,如果只想要每次滚动鼠标就遍历前n个,按顺序直到全部遍历完,应该如何操作呢
    2 replies    2014-12-07 01:13:04 +08:00
    mkeith
        1
    mkeith  
       Dec 7, 2014
    for循环啊
    fakestuff
        2
    fakestuff  
       Dec 7, 2014
    叫人写个缓存 只记一个人前n条信息,然后你就可以继续for each了。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2871 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 08:14 · PVG 16:14 · LAX 01:14 · JFK 04:14
    ♥ Do have faith in what you're doing.