Tabs

Tabs and refresh on change between them...

5 months 3 weeks ago #90100

Kostas Konstantinidis's Avatar Kostas Konstantinidis

Dear people,
I have a really weird issue which you can see on-air on
pekk.gr/index.php/draseis/psifofories/ta...-10-kalyteres-ksenes
it's on Greek language but it doesn't matter according to the problem
When you visit the page for first time everything seems to work perfect but if you click on the second tab it doen't display the image show correctly
the same happens if you click back on the first tab too
It just needs double click on every tab (after the first visit to show the contents correctly)
The basic code I use is

{tab title="greek..."  class="orange"}
{source include="all_best_int_2019.php"}{/source}
 greek...
{imageshow sl=17 sc=9 /}
{tab title="greek..." class="blue" }
{source include="all_best_gr_2019.php"}{/source}
greek...
{imageshow sl=18 sc=9 /}
{/tabs}

Is there any way to add a refresh on clicking to tabs or something?
many thank's
/kostas

5 months 2 weeks ago #90163

Kostas Konstantinidis's Avatar Kostas Konstantinidis

As I guess there is no solution...
thank's
/kostas

5 months 2 weeks ago #90164

Peter van Westen's Avatar Peter van Westen Admin

Sorry for not replying to this earlier. Seems this got lost between the cracks.

If you know how to (re)initialise the gallery via javascript, you could trigger that on the show events in tabs.

RegularLabsTabs.getElement('alias-of-my-tab').one('shown.bs.tab', function(e) {
   [... script to start playing youtube vid ...]
});

5 months 2 weeks ago #90165

Kostas Konstantinidis's Avatar Kostas Konstantinidis

it's just an image show not a video gallery

5 months 2 weeks ago #90166

Peter van Westen's Avatar Peter van Westen Admin

Sorry, that part was a copy/paste from a different answer.
So I meant:

RegularLabsTabs.getElement('alias-of-my-tab').one('shown.bs.tab', function(e) {
   [... script to re-trigger the slideshow gallery ...]
});

So the issue is with that slideshow (imageshow) that seems to not handle being loaded in an initially hidden (0px height) element very well.