Waskadagama
Posts: 3
Joined: Thu Apr 30, 2015 4:40 pm

Transmit highslide-active-anchor class

In this example http://www.highslide.com/examples/gallery-white.html when I click on the first image it becomes

Code: Select all

class="highslide highslide-active-anchor"
Then if click on the Next arrow, the first image becomes

Code: Select all

class="highslide"
but the second image doesn't get

Code: Select all

class="highslide highslide-active-anchor"
Is it possible to transmit this class from image to image in the gallery when using arrows to show what image is expand now in popup window like in this example http://www.highslide.com/examples/gallery-in-page.html but with popup window?
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: Transmit highslide-active-anchor class

This is a long-standing bug in Highslide JS, first reported about two years ago. There's no sign that the developer is going to fix it.
Waskadagama
Posts: 3
Joined: Thu Apr 30, 2015 4:40 pm

Re: Transmit highslide-active-anchor class

I tried to find information about it here, but no luck.
Can you please post or send me the link to the first topic about it?
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: Transmit highslide-active-anchor class

I'll search, but I don't think it showed up in a forum thread. IIRC, it was something in a series of emails among Torstein, RoadRash, and me. I logged it as a bug on GitHub.

But at this point, it's best to regard Highslide JS as "abandonware." There's been no development in a few years, and there's virtually no support.

I'm not a Javascript guy, so fixing something like this is pretty much over my head.
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: Transmit highslide-active-anchor class

I may have the fix for this problem. It seems to work properly with various expand/crossfade combinations. But no guarantees - when it comes to Javascript, I'm just a "take a guess and see what happens" guy.

At any rate, in highslide-full.js (don't ever waste your time with any of the subsets of the full script - it's not worth the problems):

Code: Select all

Change:

crossfade : function (up, to, from) {
	if (!up) return;

To:

crossfade : function (up, to, from) {
	if (!up) return;
	this.a.className += ' highslide-active-anchor';
Waskadagama
Posts: 3
Joined: Thu Apr 30, 2015 4:40 pm

Re: Transmit highslide-active-anchor class

Despite "you are not a Javascript guy", you did it!
This line solves the problem.
Thank you very much!
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: Transmit highslide-active-anchor class

Glad that works for you. I suspect that it would blow up under certain combinations of Highslide options, but as long as it behaves for what you're doing, that's good enough. :)

Return to “Highslide JS Usage”