Rio Yeti
Posts: 9
Joined: Wed Jul 28, 2010 5:35 pm

Autoclick "before" the images load

Hello,

I am using Highslide on a couple of websites, and have now stumbled upon a tricky one...

I added multiple galleries on the same page, but since each gallery has a lot of (big) images, and they load one after the other, when someone clicked directly on the "third" gallery, it would take forever for the images to load (as it was still loading gallery 1 and 2...). Since other galleries will be added, this was not a viable solution...

So I found a workaround : on the main page, each gallery link, instead of opening highslide, would open another page, where highslide would open automatically, and then "onAfterClose" it would redirect automatically again to the main page.
After a little bit of time, I managed to make it work.

However, it seems that the "automatic opening of highslide", takes place only after all images are loaded... so it still takes a lot of time. Is there a way to tell highslide to open immediately after the page is loaded before the images are loaded (I don't mind, if you can see the images loading).
I tried

Code: Select all

<script type="text/javascript">
   hs.objectLoadTime = 'after';
</script>
without success...

Here is the webpage : http://www.fabrica114.com/expos.php
Right now, I've added another image/link after the first click, but the automatic script is still operational (just not as fast as I would want it to be). (try by clicking on one of the 3 images, and then waiting instead of clicking again on the next image).

Thank you very much for your help !
Rio Yeti
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: Autoclick "before" the images load

The source of your problem is that you're using full-sized images as thumbnails simply by making them display smaller with HTML. So, your "thumbnails" are huge, and all of them have to load when you hit the page. Use resized, thumbnail-size images for your <img> tags, and the problem will vanish.
Rio Yeti
Posts: 9
Joined: Wed Jul 28, 2010 5:35 pm

Re: Autoclick "before" the images load

I can't believe I didn't think of that...

I did this on purpose, as I wanted to simplify the work to be done by the owner of the website... but it sounds logical.

I will try it, thanks !
Rio Yeti
Posts: 9
Joined: Wed Jul 28, 2010 5:35 pm

Re: Autoclick "before" the images load

Ok, sure enough it works... even without the whole automatic opening / redirecting etc...

I'll still keep all these options at hand, in case we end up having a lot of galleries which take too much time to open (even though I will make the thumbnails), but for now it works like a charm.

Thank you again !

While I'm still here... All the images are aligned to the bottom of the screen: if you open one gallery, you will see that when you pass on a horizontal image, it stays at the bottom (if you have a big enough screen that is)... The only way I managed to center the images was by also centering the controller (previous/play/next)... I couldn't figure out how to have the images aligned in the middle, while keeping the controller on the bottom...
It's not that important, I'm fine with it, but just in case someone has an idea, I'm throwing this out there.

Thanks
Rio Yeti
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: Autoclick "before" the images load

In the hs.addSlideshow function, try changing to:

Code: Select all

fixedControls: false,
Rio Yeti
Posts: 9
Joined: Wed Jul 28, 2010 5:35 pm

Re: Autoclick "before" the images load

Damn it MisterNeutron you're awesome !

Thank you very much, it works great !!

Have a great day.
Rio Yeti
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: Autoclick "before" the images load

Rio Yeti wrote:Damn it MisterNeutron you're awesome !
No, it's just that some problems are very familiar. Glad you got it worked out. :)

Return to “Highslide JS Usage”