我已经按照要求引入了相关js和css:
<script type="text/javascript" src="${pageContext.request.contextPath}/thickbox/js/thickbox.js"></script>
<link rel="stylesheet" href="${pageContext.request.contextPath}/thickbox/css/thickbox.css" type="text/css" media="screen" />
并且显示单张图片都正常。网上的例子都说直接在
<a href="images/plant1.jpg" title="add a caption to title attribute / or leave blank" class="thickbox" rel="gallery-plants">
里添加一个相同的rel就可以显示多张了,但我始终显示不出来,麻烦帮忙看看。
报错信息:
Syntax error, unrecognized expression: [@rel=gallery-plants]

解决方案 »

  1.   

    <a title="<s:property value='#img.photoRe'/>"    class="thickbox" href="<s:property value='fileServerUrl+"?filePath="+#img.photoUrlName'/>"  ><img title="点击查看大图"  src="<s:property value='fileServerUrl+"?filePath="+#img.photoUrlName'/>" width="70" height="86" alt="Plant <s:property value='#st.count'/>"/></a>这是页面上的代码。
      

  2.   

    thickbox多图(Gallery)无法显示解决方法
    出现这种问题,原因多因jQuery升级成了新版本,以前的[@rel]方法换成了现在的[rel]。所以,解决的方法是找到thickbox.js//79行
    //TB_TempArray = $("a[@rel="+imageGroup+"]").get();
    //替换成
    TB_TempArray = $("a[rel="+imageGroup+"]").get();
      

  3.   

    <a title="<s:property value='#img.photoRe'/>" class="thickbox" href="<s:property value='fileServerUrl+"?filePath="+#img.photoUrlName'/>" ><img title="点击查看大图" src="<s:property value='fileServerUrl+"?filePath="+#img.photoUrlName'/>" width="70" height="86" alt="Plant <s:property value='#st.count'/>"/></a>这是页面上的代码。
      

  4.   

    谢谢,这样改了之后没报错了。但是点击上一张和下一张的时候没反应了。有时间的话帮忙看看:
    http://www.qic.com.cn/spotauth/spotAuthCenter.action?mainState=7&subState=71
    这是我们网址,等着用这种效果呢。
      

  5.   

    是下载的最新的,在jquery官网上下的
      

  6.   

    现在的错是说 $(document).unkeyup() is not a Funcation
      

  7.   

    你的Thickbox 是2.0的,旧的版本
    找个3.1版本的应该就不会有问题了,从这里下个
    http://jquery.com/demo/thickbox/
      

  8.   

    去下了 新的了 结果直接出现很多乱码,浏览器未响应。有点想放弃了,colorbox怎么样啊?
      

  9.   

    都换成最新的,包括js和css文件
      

  10.   

    我换成colorbox了 ,还是非常感谢你。