jQtouch webapp 在 mac Safari 上运行良好,但在 iPhone Safari 上无法运行

发布于 2024-10-03 14:34:51 字数 807 浏览 0 评论 0原文

这是我的第一个 Web 应用程序,我按照 Jonathan Stark 的 Building iphone apps with HTML, css and javascript 开发了这个应用程序。即使我选择“开发”>“开发”,在我的 mac safari 上测试一切正常。用户代理>移动 Safari...您可以在您的 Safari 中查看上述网站,并看到它工作正常。

然而,当我最终(以为我已经)完成了所有事情并查看了我的 iPhone safari 中的内容时,整个世界崩溃了……事情太混乱了。

我正在使用 jQtouch,我以某种方式意识到这可能是因为我从 JSON 文件中提取数据...因为如果我从本地存储中提取数据(如收藏夹和组合),它可以正常工作,没有任何问题。但是,如果它从 JSON 中提取数据,那么它会变得一团糟...

我的 JSON 文件位于此处:

http://hongteetrading.com/demos/pronouncecn/lib/names.json

用于拉取数据的 javascript:

$.getJSON("lib/names.json",function(data) {

    $.each(data.names,function(i,val){
          if(val.spelling==id){ ... }

我想还有更好的方法吗?或者你在 jQtouch 中使用哪种数据交换格式?

This is my first web app and I developed this one by following Jonathan Stark's Building iphone apps with HTML, css and javascript. Everything was testing ok on my mac safari, even when I select Develop > User Agent > Mobile Safari... You can view the above site in your safari and see it's working fine.

However when I finally (thought I had) finished everything and view stuffs from my iPhone safari, the whole world collapsed... Things are so messed up.

I'm using jQtouch and I somehow get an idea that it might because I'm pulling data from JSON files... Because if I pull data from the local storage (like favorites and combination), it's working fine without any issue. However if it's pulling data from JSON, then it'll turn into a mess...

My JSON file is located here:

http://hongteetrading.com/demos/pronouncecn/lib/names.json

The javascript used for pulling data:

$.getJSON("lib/names.json",function(data) {

    $.each(data.names,function(i,val){
          if(val.spelling==id){ ... }

I guess there could be any better ways of doing it? Or what kind of data-interchange formate you're using with jQtouch?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蔚蓝源自深海 2024-10-10 14:34:51

在执行其他操作之前,您应该先修复 HTML 中的一些错误。使用 W3C 服务查看它们:

http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fhongteetrading.com%2Fdemos%2Fpronouncecn%2F%23home

一旦这些错误被修复,你将有更好的机会找到设备之间呈现不同的特定内容,因为您将遵守标准。

There are few errors in your HTML that you should fix before you do anything else. Use the W3C service to review them:

http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fhongteetrading.com%2Fdemos%2Fpronouncecn%2F%23home

Once those errors are fixed you will have a better chance of hunting down the specific things that are rendering differently between devices because you'll be conforming to standards.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文