Topic: Call event after gallery loaded

Hi all

Love simpleviewer!
But is there a way of checking when a gallery has loaded?
So I can call a javascript method when the loader bar has finished?

Thanks for your answers!

Re: Call event after gallery loaded

Using the SimpleViewer-Pro API, you could listen for the svComplete API Event.
View the source of the Direct Linking and Back Button Support example page for an example of how to use the SimpleViewer-Pro API.
There is also an example in the 'simpleviewer_pro_220/examples/HTML_embed/javascript_api.html' file which can be found in the SimpleViewer-Pro download package.

Steven Speirs
SimpleViewer Support Team.

Re: Call event after gallery loaded

Thx for your answer Steven, but i used that method, and it only checks if the simpleviewer instance is ready if I'm correct?
I need something that fires when the topbar has loaded and the images are shown...

Re: Call event after gallery loaded

The initial svImageChange will fire slightly later than svComplete (after the preloader has finished but before the image is actually displayed - which I realise is not exactly what you are after) but you could perhaps listen for this event and have your JavaScript function run then (setting a variable as a flag to ensure it is run only once on display of the initial image).
This might be the closest you will be able to get to what you are after with the available API Events.

Steven Speirs
SimpleViewer Support Team.

Re: Call event after gallery loaded

Oh cool, didn't think of that one.
Thanks man!