user2155861
user2155861

Reputation: 13

Highslide does not expand images on Wordpress

I am trying to integrate Highslide with my Wordpress site without plugins. I have changed the hs.graphicsDir variables to:

graphicsDir : 'http://hyohanpark.com/wp-content/themes/Noir/highslide/graphics/'

The code within my tags also read:

<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]-->

Here is what the code looks like when I'm displaying an image to be opened using 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>

Everything seems to be working; however, once you click an image, instead of expanding, it opens the image's URL instead as if it was a regular link to the image.

Any help to get the images to expand properly is appreciated.

Thanks!

Upvotes: 1

Views: 466

Answers (1)

RoadRash
RoadRash

Reputation: 881

I suspect there’s an inconsistency between the onclick for your images and the content of your highslide.config.js file.

When you're using config1 in the onclick you also need a corresponding configuration object in your highslide.config.js file:

var config1 = {
    //configurations for the images
};

The configuration object can be empty, but it would typically contain settings for the gallery.

Upvotes: 1

Related Questions