【问题标题】:navigator.geolocation.getCurrentPosition(showPosition) not working in jquery mobile pagenavigator.geolocation.getCurrentPosition(showPosition) 在 jquery 移动页面中不起作用
【发布时间】:2013-08-12 04:36:55
【问题描述】:

我正在尝试在我的 jquery 移动 webapp 中获取用户的当前位置。我使用了 w3schools.com http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation 上给出的代码

此代码在 w3schools 上运行良好,但是当我将其包含在我的 jquery 移动页面中时,它就不起作用了..我在我的服务器上上传了应用程序并在我的手机和笔记本电脑上进行了测试..代码不起作用..

我的jquery手机页面代码:http://pastebin.com/qZafsJt4

【问题讨论】:

  • 尝试更新你的 jQuery 版本。我用 jQuery 1.9.1 和 jQuery Mobile 1.3.0b1 测试了你的代码,它工作得很好。你可以看看here
  • 哎呀..我使用的是 jquery 1.6.4 ..非常感谢

标签: jquery html jquery-mobile


【解决方案1】:

您需要将您在 jQuery 上的版本升级到 1.9.1

【讨论】:

    猜你喜欢
    • 2017-01-26
    • 1970-01-01
    • 2013-11-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多