top of page
Forum Posts
Pawan
Apr 14, 2020
In Coding with Velo
I'm trying to create a map with about 35 Location Pin (button) where each pin pops-up a menu (a group of about 7-8 buttons). I want to achieve an effect; when a Location Pin is hovered, its respective menu to pop-up and rest all other menus to hide... as shown in the video below. My problem is; there are 34 Pin's menu should hide when one Pin is hovered. That means, I need to write code for all those 34 element to hide 34 times (34 x 34= 1156 line code) ... it's a lot of code. Is there a way I can achieve this with a simple approach? where with one line code I can hide all the 34 items. Here is the sample code that I started writing but than I realised it would 1,156 line code... its too much. export function Penedesbutton_mouseIn(event) { $w('#PenedesBox').show() $w('#PenedesLine').show() $w('#PladeBagesBox').hide() $w('#PladeBagesLine').hide() $w('#PrioratBox').hide() $w('#PrioratLine').hide() } // ---------- Priorat (DOCa) ---------- // export function PrioratButton_mouseIn(event) { $w('#PrioratBox').show() $w('#PrioratLine').show() $w('#PenedesBox').hide() $w('#PenedesLine').hide() $w('#PladeBagesBox').hide() $w('#PladeBagesLine').hide() Thanks, Pawan
0
2
123
Pawan
Apr 12, 2018
In Coding with Velo
Hi, Can someone guide me on how to achieve this kind of effect. Here I don't even know what this effect/ animation called as. I tried OnViewportEnter/ Leave using anchor but I failed. FYI: I don't know much about javascript / WiXCode. I just learnt how to get sticky header via few Youtube. Thanks, Pawan
1
9
9k
Pawan
Feb 28, 2018
In Coding with Velo
I've just started using WiXCode and I'm very new for Javascript. I was referring to WiX resource 'https://www.wix.com/code/home/example/Preloader' and I was trying to have a preloader that is connected to a Lightbox. But somehow it is showing some error. You can refer to screen-recording: http://take.ms/15AEG Surprisingly when I connect this with a 'Box' it works perfectly fine. Here is the code that I'm using: $w.onReady(() => {
waitForLoading();
});
export function button6_onClick() {
$w('#lightbox1').show();
waitForLoading();
}
function waitForLoading() {
setTimeout(() => {
$w('#lightbox1').hide('FadeOut');
}, 1500);
}
Also, do I really need to use this code? export function button6_onClick() {
$w('#lightbox1').show();
waitForLoading();
} Can someone please help. Thanks, Pawan
0
9
1k
Pawan
Feb 25, 2018
In Coding with Velo
I've just started using WiXCode and I'm very green on Javascript. My entire learning is from WiX videos, but there is no vodeo for ViewPortEnter' & 'ViewPortLeave'. Can some one please help with a video to show the basics of ViewPortEnter' & 'ViewPortLeave' and how to use it.
0
8
784
Pawan
More actions
bottom of page