简体   繁体   English

在iPhone UIWebview html5中切换页面内容

[英]Switching page content in iphone UIWebview html5

I'm building an iphone app. 我正在构建一个iPhone应用程序。 I have multiple "pages/sections" of content, and I'd like to see what you all thought was the best way to swap the content out. 我有多个内容的“页面/部分”,我想看看大家都认为是换出内容的最佳方法。 I'm using jquery. 我正在使用jquery。 This doesn't look like a typical iphone app, and so I'm not using jqtouch. 这看起来不像典型的iPhone应用程序,因此我没有使用jqtouch。

Currently, I have a container div and I use the jquery load method to load in the different bits of content from separate html pages. 当前,我有一个容器div,并且我使用jquery加载方法从单独的html页面加载内容的不同位。 This it works fine in theory but it's not "snappy" enough. 从理论上讲,这很好用,但是不够“贪吃”。

I tried to put all of the content on the main page in a hidden div and then use clone().appendTo... method but this was even slower (makes sense that it was slow in hind sight). 我试图将所有内容放在主页上的一个隐藏的div中,然后使用clone()。appendTo ...方法,但这甚至更慢(从某种意义上说,事后看来很慢)。 I'm wondering if anyone could recommend a faster way? 我想知道是否有人可以推荐一种更快的方法?

速度缓慢是由我为页面设置动画而不是内容加载引起的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM