I used the code and instructions from here: https://support.wix.com/en/article/how-to-use-wix-code-to-display-elements-in-mobile-only
First element works perfectly, with it not showing on desktop and showing on mobile. The second element, though, is hidden on desktop and also won't show up on mobile.
The code currently looks like this:
Please advise!
Actually we are doing web debugging 101, i am sure you'll find a lot of info on the web. it is not specific to wix code but any javascript debugging .
i am trying to guide you to debug the conditions and variables step by step so you can learn more about your program and how to adjust it.
go to tab - sources and you'll see the program execution halts on the debugger keyword (remove it when done), then on the right side you can go step by step, each time evaluate your variables and conditions - type them in console and look into their value
btw, what is the url of the site you are trying to build?
good luck,
Shlomi
??? What am I doing next?
Yes, using the word debugger, just during development will pause you there while this view is open
Is this what you're referring to? F12 on Chrome?
yes, now when in chrome dev tools in that breakpoint using the console you look into wixWindow.formFactor what do you see?
Did I do it right this time? Nothing looks different...
Hi,
Actually, i meant 4 and 5 in the previous setup, meaning under the $w.on ready and above the if condition. Enable the chrome dev tools and you should be within the right context
Shlomi
I dropped it as you said, but no good. The second element "#faqWidget1" still isn't showing up.
I also tried changing out the second ID with other ones to see if the FAQ widget was the problem, and none of the ID's I used worked.
Hi,
did you try to drop the word 'debugger;' between lines 4 and 5 to see the context and if the condition is true?
Shlomi