I have code that populate a repeater from a query. It works great on the Web but it doesn’t work on my Mobile.
Repeaters that are populated from dataset work fine in both
Is the Code working on mobile?
Hi,
I noticed some errors in your mobile site code.
Fix the errors and the code should work as expected.
How do you open this console from your mobile?
And why don’t I have any of those errors on the web, I doubled checked now.
BTW - the page that is showing on the console is not the page that has a problem with the repeater.
But in any case, i’d like to understand how to open the console from the mobile and why I have errors on the mobile while on the Web it works perfectly?
Some elements are hidden from mobile view. This causes the show and hide errors since your code is unable to find the elements.
See here
To debug your mobile site while editing :
Switch to mobile view > click preview > Click the developer console at the bottom to expand it and/or open your browser developer console (usually F12)
Debugging a live mobile site is a bit more complicated but possible with most modern web browsers.
For Google Chrome, see here
Thank you Ido,
What do you suggest I do? there are some elements that need to be shown and hidden on the web, but those elements are always hidden on the mobile.
Actually, I understand now that if Wix doesn’t fix this problem, I cannot use the mobile at all!
Any code that I write on an element that is hidden in the mobile will be an error!
Meaning… Code doesn’t work with Mobile :-(((
Hi
Modify your code to determine if the visitor is using mobile or desktop using formFactor method, then interact with the elements accordingly.
http://www.wix.com/code/reference/wix-window.html#formFactor
Doing this take away all the responsiveness from Wix, doesn’t it?
I have to write different code for web and for mobile? and remember it if I change it. Doesn’t make sense to me!