dynamically loading content for photoswipe

不羁的心 提交于 2019-12-11 11:54:18

问题


I am loading the content of photoswipe gallery dynamically. The first 5 image url are loaded from database on the pageload and work like it should be.

The problem


  • I click in one of the links, the Photoswipe open loaded with the 5 images that are in the list.
  • My code update the list with new 5 images.
  • Photoswipe doesn't update the image galery.

My code is below:

<script type="text/javascript">
    setInterval(function() {
        $("#vbar").load(location.href+" #vbar>*","");
    }, 10000);
</script>

I have got this advice: Photoswipe same source code but output not working. But it is not working.

Here is the live page

来源:https://stackoverflow.com/questions/21629963/dynamically-loading-content-for-photoswipe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!