"Shadowbox.change" won't change the gallery group

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

"Shadowbox.change" won't change the gallery group

robster1
Hello.

I'm having another problem with the Shadowbox. I'm filling my Shadowbox with HTML content from a DIV-Container. Within this content I would like to use links to switch to another content.

It's working fine, but the problem is, that the Shadowbox won't change the "gallery" attribute. So if I'm switching from one gallery to another, it just switches the content, but the Shadowbox navigation won't appear.

This is my switch function:
function switchShadowbox(boxId) {
	var Shadowbox = window.parent.Shadowbox;
	var galId = boxId.replace('#', '');

	Shadowbox.getCurrent().content 						= $('' + boxId + '').html();
	Shadowbox.getCurrent().gallery				 		= '' + galId + '';

	Shadowbox.change(Shadowbox.current);
}

The name of my gallery variable (galId) is correct, if I alert it.

Does anyone has clue how to fix this?

Kind regards
robster