Chrome浏览器不会在刷新时重新加载Nanogallery2 javascript

时间:2018-01-09 09:06:43

标签: javascript jquery html nanogallery

当我尝试在Safari中重新加载以下代码时,它运行良好,但chrome浏览器在刷新时不会重新加载Nanogallery2 javascript。

感谢任何帮助!

附上示例代码: -

       

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<link href="https://unpkg.com/nanogallery2/dist/css/nanogallery2.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="https://unpkg.com/nanogallery2/dist/jquery.nanogallery2.min.js"></script>

  

<h1>Gallery made with nanogallery2</h1>

<div data-nanogallery2='{
    "itemsBaseURL": "http://nanogallery2.nanostudio.org/samples/",
    "thumbnailWidth": "200",
    "thumbnailAlignment": "center"
  }'>
  <a href="berlin1.jpg" data-ngthumb="berlin1t.jpg" data-ngdesc="">Berlin 1</a>
  <a href="berlin2.jpg" data-ngthumb="berlin2t.jpg" data-ngdesc="">Berlin 2</a>
  <a href="berlin3.jpg" data-ngthumb="berlin3t.jpg" data-ngdesc="">Berlin 3</a>

</div>

1 个答案:

答案 0 :(得分:0)

好像是Cahe问题。删除浏览器缓存并检查

因为它正在为我工​​作,我正在检查Google Chrome Version 61.0.3163.91 (Official Build) (64-bit)

&#13;
&#13;
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<link href="https://unpkg.com/nanogallery2/dist/css/nanogallery2.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="https://unpkg.com/nanogallery2/dist/jquery.nanogallery2.min.js"></script>
<h1>Gallery made with nanogallery2</h1>

<div data-nanogallery2='{
    "itemsBaseURL": "http://nanogallery2.nanostudio.org/samples/",
    "thumbnailWidth": "200",
    "thumbnailAlignment": "center"
  }'>
  <a href="berlin1.jpg" data-ngthumb="berlin1t.jpg" data-ngdesc="">Berlin 1</a>
  <a href="berlin2.jpg" data-ngthumb="berlin2t.jpg" data-ngdesc="">Berlin 2</a>
  <a href="berlin3.jpg" data-ngthumb="berlin3t.jpg" data-ngdesc="">Berlin 3</a>

</div>
&#13;
&#13;
&#13;