have a little problem here. Have a Hype project with “scene A” and “scene B”.
– I am starting with “scene A”. After that I am jumping onClick to “scene B”.
– I am using this little javascript onSceneLoad for “scene-B”:
At a guess you need to load something on all scene loads.
But as you have not included any info at least on the API you are using, thats all I can offer without doing a search on google for something in Jquery that uses .tabs() and then have to work out if I have the right one and what it does…
Thanks for the the quick one Mark. I will put together a Hype scene – you are right it is probably impossible to say something without seeng the scene – would be glad if you could have a look when I posted the scene…
@MarkHunte – Here we go again Sorry for the huge scene and all the junk inside… I have deleted all the othe scenes.
Click Reel Holder > working fine
Click Start
Click Reel Holder > fails to build the tabs
Using the JS and the CSS from the materializecss library…
The tabs structure are declared in the innerhtml of the object “tab” in the second scene
JS for creating the tab is called at scene load “createTabs()”
@MarkHunte – doing a little search here. I suppose that I have to destroy the created tabs when leaving the scene and created them again on sceneLoad. Just don’t have a clue if there is an easy way doing this with JQuery… Unfortunately there is not so much documentation about this for materializecss…
OK. Did some further investigations here. Dropping the “swipable” function seems to result in cleaner code. Of course it is not so sophisticated, since you can not swipe now between the tabs. But changing the tabs is working if you klick on them. I think all this has to do something with the way how the guys are constructing the swipable tabs. There is no destroy option for the tabs (now) according to theyr GitHub pages. I think that since I will have to use a LOT of this tabs (this was the reason I opted for the 3rd party library and not for Hype native) the problems will even increase without a clear support from materializecss for creating/distroying/acting with multiple swipable tabs. I will fill a request anyhow on their page – would be absolutely nice to have this cool swipable tabs inside Hype.
Will continue anyhow tomorrow an will report here if I found something useful…
Uless of course one of you guys can come up with a nice idea
What seems to be happening is the materializecss replace the ‘tabs-content.carousel.initialized’ (Tabs) with a new one.
But it does not fully clear out all the old one.
I found this be giving each creation an id. Every time the createTabs() runs the children are moved to the new ‘tabs-content.carousel.initialized’ div. It is supposed to fully remove the old one but does not do this correctly and then things just compound into a mess.
The answer is to check for all the ‘tabs-content.carousel.initialized’ divs that do not have any children with a id ( in this example ) of #test-swipe-1 and remove them.
This seems to work. Note when materializecss first loads a ‘tabs-content.carousel.initialized’ s created.
We need to keep this one so we add a global var to the head file and use it as a run counter.
I am uploading here a stripped down project (have to remove the initial one) in case that this is useful for somebody else.
Thanks again for the outstanding support and help…