我正在尝试集成Highslide与我的Wordpress网站没有插件。我已将hs.graphicsDir变量更改为:
graphicsDir : 'http://hyohanpark.com/wp-content/themes/Noir/highslide/graphics/'我的标签中的代码也是这样的:
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/highslide/highslide-with-gallery.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/highslide/highslide.config.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/highslide/highslide.css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/highslide/highslide-ie6.css" />
<![endif]-->下面是当我使用highslide显示要打开的图像时的代码:
<div class="highslide-gallery">
<ul>
<li>
<a href="http://hyohanpark.com/wp-content/uploads/2013/03/IMG_0042.png" class="highslide"
onclick="return hs.expand(this, config1 )">
<img src="http://hyohanpark.com/wp-content/uploads/2013/03/IMG_0042.png" width="230" height="154" alt=""/>
</a>
</li>
</ul>
<div style="clear:both"></div></div>一切似乎都正常;但是,一旦单击图像,它就会打开图像的URL,而不是展开图像,就好像它是指向图像的常规链接一样。
任何帮助让图像正确扩展的人都会很感激。
谢谢!
发布于 2013-03-11 23:21:59
我怀疑图像的onclick和highslide.config.js文件的内容不一致。
当您在onclick中使用config1时,您的highslide.config.js文件中还需要一个相应的配置对象:
var config1 = {
//configurations for the images
};configuration对象可以是空的,但它通常包含库的设置。
https://stackoverflow.com/questions/15333563
复制相似问题