Photoswipe ajax错误
我试图使用 Ajax 调用让 Photoswipe 2.1.1 在 jQuery Mobile 站点中工作(每个页面都是一个单独的网页),但我发现了一个看起来像错误的东西。
即使在随下载提供的示例文件中也会发生这种情况。
试试这个:从示例文件夹中,在 Web 浏览器中启动 05-jquery-mobile-ajax.html。 单击进入 Gallery1,然后点击返回按钮,再次单击 Gallery1,然后单击其中一张图像。图像作为直接链接加载(不在 Photoswipe 内)。
第一次单击时,一切都按预期工作,但第二次则不然。不幸的是,这使得 Photoswipe 无法使用。其他人可以证实这一点吗?
我想将此报告为错误,但找不到任何方式联系 Photoswipe 的人员。希望他们正在观看!
如果我找不到解决方案,有人可以推荐 JQ mobile 的替代照片库吗?
I'm trying to get Photoswipe 2.1.1 working within a jQuery Mobile site using Ajax calls (each page is a separate web-page) but I've found what looks like a bug.
Even in the example file provided with the download this happens.
Try this: from the examples folder, launch 05-jquery-mobile-ajax.html in a web browser.
Click through to Gallery1, then hit back button, click Gallery1 again then click on one of the images. The image loads as a straight link (not within Photoswipe).
The first time you click through everything works as expected, but the second time it doesn't. Unfortunately this makes Photoswipe unusable. Can anyone else confirm this?
I'd like to report this as a bug but can't find any way to contact the people at Photoswipe. Let's hope they're watching!
If I can't find a solution can anyone recommend an alternative photo gallery for JQ mobile?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我一直遇到与 MikeyB 描述的完全相同的问题。
我的解决方案是向指向 Photoswipe 图库页面的锚点添加 rel="external",然后使用默认示例 (01-default) 中的 Photoswipe JS 函数,而不是 JQM 特定示例 (05- jquery-mobile-ajax.html)。
请记住将您的无序列照片列表从:
更改为:
I've been having the exact same problem MikeyB describes.
My solution was to add a rel="external" to the anchor that leads to the Photoswipe gallery page and then use the Photoswipe JS function from the default example (01-default) rather than the JS function from the JQM specific example (05-jquery-mobile-ajax.html).
Remember then to change your unordered list of photos from:
to:
我们现在已经处理了这个问题。我认为 JQM 在最新的测试版中做了一些有趣的事情。有补丁,将在 v2.1.2 中修正
Photoswipe 可通过 GitHub 联系,如我们网站上所示。
希望这有帮助!
We have now dealt with this. JQM is doing something funny I think in the latest beta. Have a patch, will be rectified in v2.1.2
Photoswipe is contactable via GitHub as displayed on our website.
Hope this helps!
问题是,当您单击后退按钮时,仅重新加载最新的“页面”div,因此不会重新加载并重新应用js。我也一直在寻找解决这个问题的方法。我的所有链接中都有 rel-“external”,一切正常。但是,如果用户使用浏览器“后退”按钮,我需要一种方法来强制 javascript 重新加载到图库元素上。
The problem is that when you click the back button, only the latest 'page' div is reloaded so the js is not reloaded an re-applied. I have been looking for a solution to this as well. I have rel-"external" in all my links and everything works fine. But if the user uses the browser 'back' button, I need a way to force the javascript to reload onto the gallery elements.