首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GalleryView Jquery

GalleryView Jquery
EN

Stack Overflow用户
提问于 2010-05-17 15:11:56
回答 2查看 2.7K关注 0票数 1

我正在尝试在我的网站上实现 JqueryGallery (大灰色框)。现在我的问题是图像没有出现。

我的网站

这里是我的头代码:

代码语言:javascript
复制
<link href="css/galleryview.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/jquery.galleryview-2.1.1.js"></script>
<script type="text/javascript" src="js/jquery.timers-1.2.js"></script>
<script type="text/javascript">
    $(document).ready(function(){       
        $('#photos').galleryView({
            panel_width: 655,
            panel_height: 336,
            transition_speed: 1500,
            transition_interval: 5000,
            nav_theme: 'dark',
            border: '1px solid white',
            pause_on_hover: true,
        });
    });
</script>

这里是我的画廊代码:

代码语言:javascript
复制
<div id="photos" class="galleryview">
<div class="panel">
     <img src="http://spaceforaname.com/img/gallery/01.jpg" /> 
    <div class="panel-overlay">

      <h2>Effet du soleil sur le paysage</h2>
      <p>Photo by <a href="http://www.sxc.hu/profile/tomharry" target="_blank">tomharry</a>.  View full-size photo <a href="http://www.sxc.hu/photo/158829" target="_blank">here</a>.</p>
    </div>
  </div>
  <div class="panel">
     <img src="http://spaceforaname.com/img/gallery/02.jpg" /> 
    <div class="panel-overlay">

      <h2>Eden</h2>
      <p>Photo by <a href="http://www.sxc.hu/profile/emsago" target="_blank">emsago</a>.  View full-size photo <a href="http://www.sxc.hu/photo/152865" target="_blank">here</a>.</p>
    </div>
  </div>
  <div class="panel">
     <img src="http://spaceforaname.com/img/gallery/03.jpg" /> 
    <div class="panel-overlay">

      <h2>Snail on the Corn</h2>
      <p>Photo by <a href="http://www.sxc.hu/profile/baines" target="_blank">baines</a>.  View full-size photo <a href="http://www.sxc.hu/photo/34453" target="_blank">here</a>.</p>
    </div>
  </div>
  <div class="panel">
     <img src="http://spaceforaname.com/img/gallery/04.jpg" /> 
    <div class="panel-overlay">

      <h2>Flowers</h2>
      <p>Photo by <a href="http://www.sxc.hu/profile/jazza" target="_blank">jazza</a>.  View full-size photo <a href="http://www.sxc.hu/photo/990169" target="_blank">here</a>.</p>
    </div>
  </div>
  <div class="panel">
     <img src="http://spaceforaname.com/img/gallery/06.jpg" /> 
    <div class="panel-overlay">

      <h2>Alone Beach 2B</h2>
      <p>Photo by <a href="http://www.sxc.hu/profile/sgursozlu" target="_blank">sgursozlu</a>.  View full-size photo <a href="http://www.sxc.hu/photo/738279" target="_blank">here</a>.</p>
    </div>
  </div>
</div>
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2010-05-17 15:49:26

很高兴你搞清楚了。但仅供您参考,要利用新脚本2.1.1:您的代码应该如下所示:

代码语言:javascript
复制
<ul id="photos" class="galleryview">
  <li>
    <img src="http://spaceforaname.com/img/gallery/01.jpg" /> 
    <div class="panel-overlay">
      <h2>Effet du soleil sur le paysage</h2>
      <p>Photo by <a href="http://www.sxc.hu/profile/tomharry" target="_blank">tomharry</a>.  View full-size photo <a href="http://www.sxc.hu/photo/158829" target="_blank">here</a>.</p>
    </div>
  </li>
  <li>
    <img src="http://spaceforaname.com/img/gallery/02.jpg" /> 
    <div class="panel-overlay">
      <h2>Eden</h2>
      <p>Photo by <a href="http://www.sxc.hu/profile/emsago" target="_blank">emsago</a>.  View full-size photo <a href="http://www.sxc.hu/photo/152865" target="_blank">here</a>.</p>
    </div>
  </li>
  <li>
    <img src="http://spaceforaname.com/img/gallery/03.jpg" /> 
    <div class="panel-overlay">
      <h2>Snail on the Corn</h2>
      <p>Photo by <a href="http://www.sxc.hu/profile/baines" target="_blank">baines</a>.  View full-size photo <a href="http://www.sxc.hu/photo/34453" target="_blank">here</a>.</p>
    </div>
  </li>
  <li>
    <img src="http://spaceforaname.com/img/gallery/04.jpg" /> 
    <div class="panel-overlay">
      <h2>Flowers</h2>
      <p>Photo by <a href="http://www.sxc.hu/profile/jazza" target="_blank">jazza</a>.  View full-size photo <a href="http://www.sxc.hu/photo/990169" target="_blank">here</a>.</p>
    </div>
  </li>
</ul>

正如您所看到的,代码更加简洁,并且在语义上更加正确(查找http://www.456bereastreet.com/lab/web_development_mistakes/),因此可能值得升级。:)

票数 0
EN

Stack Overflow用户

发布于 2010-05-17 15:29:49

找出问题是两个脚本之间的冲突。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2850236

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档