2015-09-14 44 views
0

因此,我選擇使用Photoswipe並將我的標記包含在我的html文件中,如photoswipe文檔中所述。我已經安排我的照片和標記,因爲它是在codepen例所示:幻燈片列表幻燈片列表

<div class="my-gallery" itemscope itemtype="http://schema.org/ImageGallery"> 
      <div class="row"> 
       <div class="col-md-3"> 
       <figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject"> 
        <a href="images/1.jpg" itemprop="contentUrl" data-size="1024x1024"> 
         <img src="images/1.jpg" itemprop="thumbnail" alt="Image description" /> 
        </a> 
        <figcaption itemprop="caption description">Sunset</figcaption>   
       </figure> 
       </div> 
       . 
       . 
       . 
       and so on 

我剛剛結束標記之前添加的photoswipe HTML標準桿,我已經包含在此的jsfiddle中的腳本: https://jsfiddle.net/9wea0gy4/

,當我點擊我的形象,我結束了這種誤差對

未捕獲的SecurityError:未能執行「pushState的」上「歷史」:與URL「文件的歷史記錄狀態對象:/// C:/Users/Kora%C4%8D/Desktop/Projekti/MMS/Portfolio/index.html#section3 & gid = null & pid = 1'不能在源文件'null'中創建。

任何人都有線索這是關於什麼?

回答

0

我一直有同樣的問題,它看起來像當你在本地測試時發生這個錯誤。我將我的文件上傳到我的網絡服務器,並且問題自行解決。它看起來像它與在Photoswipe代碼某處解析URL的一個問題:

https://github.com/angular/router/issues/326

+0

很高興聽到這個消息,我不知道,如果運行它低谷WAMP幫助,但我會盡力。將留下反饋 –