Page 1 of 1

Wix website & full screen button disabled?

Posted: Sat Jan 02, 2021 9:55 am
by JGoding
Hi,

After adding some of my virtual tours to my Wix website https://www.godingprojects.com/ I have discovered none of the full screen buttons are working (while the other buttons are). Would anyone have any ideas on how to make this button work?

Thanks in advance!

Joe

Re: Wix website & full screen button disabled?

Posted: Sat Jan 02, 2021 4:31 pm
by 3DV
This is due to the fact that the tours are shown in an iframe. It's a bit like looking through a window on the main page to your actual tour page, instead of the tour being integrated in the webpage itself.
So your tour may be showing in 'full screen' in its iframe already. You'll have to change the iframe itself to use full screen.

There are ways to make the iframe use full screen using JavaScript (for example https://stackoverflow.com/questions/337 ... tton-click) but I don't know how this works with Wix.
This might be a solution: https://www.wix.com/corvid/forum/tips-t ... lcomponent

Re: Wix website & full screen button disabled?

Posted: Thu Jan 21, 2021 5:27 am
by JGoding
Thanks 3DV,

I got some help from my brother (who has computer science, gaming degrees and is generally very handy!) He found that the Dev Mode is turned off by default and lots of stuff won't work until it's turned on.

I also found out from him my IFrame code was wrong, and is a bit special to Wix who have their own way of doing things! Annoying but now working. Here is what worked for me:

// API Reference: https://www.wix.com/velo/reference/api- ... troduction
// “Hello, World!” Example: https://learn-code.wix.com/en/article/1-hello-world

$w.onReady(function () {
$w("#html1, #html2, #html3, #html4, #html5, #html6, #html7, #html8, #html9, #html10, #html11").allowFullScreen();
});


*Note where there is only one IFrame on the page you only need to show one of these #html elements, i.e.

$w.onReady(function () {
$w("#html1").allowFullScreen();
});


(and make sure that Dev tools is turned on!) Good luck you other Wix users - hope this was helpful!