Hi everyone, JS noob here. This is only for the intro blurb on the homepage.
1. The code works in preview, but not when I publish it.
2. Also I can see on the published site that the first link "Toronto based" is showing a clicking cursor on the desktop site which it should not.
link to my site: https://www.ayeshaamanulla. com/
Here is all my code:
import wixWindow from 'wix-window'; { // Hides the element when the page loads $w("#image10").hide(); $w("#image13").hide(); $w("#image12").hide(); $w("#image11").hide(); } export function text62_mouseIn(event) { $w("#image10").show("fade"); $w("#image13").show("fade"); } export function text62_mouseOut(event) { $w("#image10").hide("fade"); $w("#image13").hide("fade"); } export function text66_mouseIn_1(event) { $w("#image11").show("fade"); } export function text66_mouseOut_1(event) { $w("#image11").hide("fade"); } export function text68_mouseIn(event) { $w("#image12").show("fade"); } export function text68_mouseOut(event) { $w("#image12").hide("fade"); } export function text62_click(event) { if(wixWindow.formFactor === "Mobile" || wixWindow.formFactor === "Tablet"){ if($w('#image10').hidden){ $w('#image10').show("fade"); } else{ $w('#image10').hide("fade"); } } } export function text68_click(event) { if(wixWindow.formFactor === "Mobile" || wixWindow.formFactor === "Tablet"){ if($w('#image12').hidden){ $w('#image12').show("fade"); } else{ $w('#image12').hide("fade"); } } } export function text66_click(event) { if(wixWindow.formFactor === "Mobile" || wixWindow.formFactor === "Tablet"){ if($w('#image11').hidden){ $w('#image11').show("fade"); } else{ $w('#image11').hide("fade"); } } }
I understand that but that's why i added the code for onclick for mible. However, now I removed the mobile onclick parts and the mousein code still does not work on my published site.
I think the problem is, it's hard to do mousein/out well on mobile. When a user clicks and drags their finger over something, it doesn't register as doing mousein, the cellphone just thinks the user is trying to scroll/move the screen. The reason it works in preview is because in preview you're using your mouse to test it.