Javascript小部件受iPhone UITableView的启发? [英] Javascript widget inspired by iPhone UITableView?

查看:66
本文介绍了Javascript小部件受iPhone UITableView的启发?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Cocoa Touch的UITableView允许用户滚动浏览大量具有良好性能的数据行,因为它会循环使用表行。不是为每个单独的数据行创建GUI元素,而是创建有限数量的表行,并在用户滚动时使用相关数据进行更新,从而产生在大量表行中上下导航的错觉。 / p>

有没有人在javascript中看到过这个?是否有可以在我这里使用的插件?

解决方案

infinity.js效果很好。它将在幕后动态加载页面,为您提供列表已满载的外观。



更多信息可以在他们的Github页面上找到 - https: //github.com/airbnb/infinity



此外,我已经将项目分叉更新,以便与Zepto一起使用。我还将它设置为使用任何可滚动的div(设置为overflow:scoll)和类'scrollable' - https: //github.com/elliotcw/infinity



我应该补充一点,我做了这些更改,因为这对移动设备上的大型列表很有用,当你需要页面上的许多复杂元素时。


Cocoa Touch's UITableView allows a user to scroll through large numbers of data rows with good performance because it recycles table rows. Rather than create a GUI element for every single data row, a limited number of table rows is created, and simply updated with the relevant data as the user scrolls, giving the illusion of navigating up and down a very large number of table rows.

Has anyone seen this done in javascript? Is there a plugin available anywhere that will do this for me?

解决方案

infinity.js works well. It will dynamically load 'pages' behind the scenes giving you the appearance that the list has been fully loaded.

More information can be found on their Github page - https://github.com/airbnb/infinity

Additionally, I've forked the project updating it to work with Zepto. I also set it up to use any scrollable div (set up with overflow: scoll) with the class 'scrollable' - https://github.com/elliotcw/infinity

I should add that I made these changes as this is great for large lists on mobile devices, which slow down when you have to many complex elements on the page.

这篇关于Javascript小部件受iPhone UITableView的启发?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆