RaSch
Posts: 1
Joined: Tue Jul 26, 2016 1:32 pm

inconsistent behavior in ajax loaded page

Tue Jul 26, 2016 1:43 pm

Hello,

Im using highlide since 2011 and usually there are no problems at all.

But now I'm stuck with a special problem that I couldn't find an answer to up to now.

To describe it, I have to start with some "no-problems":

Using Highslide on a page with some images like these

Code: Select all

	<a class="highslide" href="pic1.jpg" onclick="return hs.expand(this)"><img src="pic1-thn.jpg" alt="my pic 1"></a>
	<a class="highslide" href="pic2.jpg" onclick="return hs.expand(this)"><img src="pic2-thn.jpg" alt="my pic 2"></a>
	<a class="highslide" href="pic3.jpg" onclick="return hs.expand(this)"><img src="pic3-thn.jpg" alt="my pic 3"></a>
works fine and I can step from expanded pic1 to pic3 and back using the arrow-keys as expected.

Now I put the above code in a separate page that is loaded via Ajax into the first page.

In this case expanding each of the single Thumbnails can be expanded as expected BUT(!) only each pic for itself. There is no more stepping from expanded pic to expanded pic using the arrow keys. Using "hs.slideshowGroup" doesn't make a difference here.

I tried the second page aditionally with 'stand-alone'-properties as described in "http://roadrash.no/hs-support/ajax-with-image.html" and this works perfectly, the pics are recognized as a group - but only 'stand-alone'.

This same page loaded into the initial one again leads to the 'no-more-grouping'-behaviour.

While testing I found out that having the above code-block in both the main page loaded initially PLUS in the ajax-loaded second page makes highslide recognize the pics in the second page as a group again. But of course the pics should appear solely on the second page.

So I would like to ask if there might be a way to make Highslide recognize several pics in an ajax-loaded page as a group?

Thank you very much for any hint.

Return to “Highslide JS Usage”