I am making a custom mega menu that uses expand and collapse commands to open and close different strip menus for each header on the page. My problem is when switching between each header there is a flash where one collapses and another opens about 0.5 seconds later and looks terrible so is there any way to make a delay on a piece of code (my code linked below)
export function lsbutton_mouseIn(event) {
$w('#lsdropdown').expand();
}
export function lsbutton_mouseOut(event) {
$w('#lsdropdown').collapse();
}
export function lsdropdown_mouseIn(event) {
$w('#lsdropdown').expand();
}
export function lsdropdown_mouseOut(event) {
$w('#lsdropdown').collapse();
}
export function ftbutton_mouseIn(event) {
$w('#ftdropdown').expand();
}
export function ftbutton_mouseOut(event) {
$w('#ftdropdown').collapse();
}
export function ftdropdown_mouseIn(event) {
$w('#ftdropdown').expand();
}
export function ftdropdown_mouseOut(event) {
$w('#ftdropdown').collapse();
}
export function mbutton_mouseIn(event) {
$w('#mdropdown').expand();
}
export function mbutton_mouseOut(event) {
$w('#mdropdown').collapse();
}
export function mdropdown_mouseIn(event) {
$w('#mdropdown').expand();
}
export function mdropdown_mouseOut(event) {
$w('#mdropdown').collapse();
}
My aim is to add a 0.5 delay to the collapse command on the mouse out of the buttons.
Hope someone can help me, Thanks, Josh