Dear friends, I have a quesiton about Velo and Editor X.
I am using Muli-State boxes well in Wix editor and switching them with this code
export function button2_click(event) {
$w(“#multistatebox”).changeState(“box1”);
}
export function button2_click(event) {
$w(“#multistatebox”).changeState(“box2”);
}
to switch boxes with button, it is great solution for speed up the website and avoid page switching. But “.changeState” is not working in Editor X. there is an arror.
I can not find such option in Editor X. .
Can you advise what can be the solution to reach the same result as with multi-state box with buttons, but in editor X?
This is a very important component it should be a main component, i want to move to editor x but without that multi state box i couldn’t continue. Please speed up the process to release it in the next update as soon as possible.
Thanks for the great job and i am pretty sure that editor x will be a revelation in web development.
Hi Guys, any update on this yet? it is still Beta so I can understand its still in development. I do need this function. My development has come to a holt as I cannot design what I wanted.
The Task:
I intended to add to my responsive drop down menu a multi box with repeaters on each state. In my dropdown menu I have more buttons (sub menu) which on hover will change the state of my multi box. The repeater will show an image and the image will change when the user hovers over differnt buttons.
I have managed to get around the lightbox issues and imitated my header menu in the lightbox. On hover it simply opens a lightbox with another header menu in the lightbox. https://bhm661.editorx.io/bytec-new
All thats missing is the multibox and images. (plus there is a bug here too, whats in editor and what live is not correct and changes despite having fixed paramiters. I have put a 1px margin Top & bottom to show a shadow, this 1xp+1xp has resulted in an extra 2px where there should not be, I have a fix but will leave it so you can see. the fix is on solutions)
Question: Is show/hide more effective than if we had a multibox, given that it was provided. Focus is Page speed - reaction time. Which will preform better ? as if the multi box , when ready, acutally imposes more loadtime than to have that function as code I may want to build it in code anyway as I dont want any additonal requests.
Also I have an idea too: Can you use pro galleries for my Task? As the repeater is image related I’m just thinking maybe use that and call a slide as if its a state. But can you even call a slide within a gallary? Change slide in relation to hover button.
Hey Ben,
Awesome work on that mega menu, it seems to work pretty good with the solutions you found!
Regarding performance, there’s not much of a difference, BUT there might be a slight advantage for the hide/show, as it affects the CSS visibility of the element, while the state box changes render or remove states from the DOM (HTML tree) which is a bit more ‘expensive’.
I think there are many ways to implement this behaviour, but the solution you chose using show/hide seems to be pretty optimal.
Regarding the extra margins that appear in the published site vs. editor, I could not locate the area you referred to so I cannot investigate further, try to provide some screenshots maybe.
Closing this thread as all the previous posts are pretty old and this issue has long resolved. If you are experiencing any issues with changing states, please reach out in a new post, check t he Velo forum if there are known issues or r each out to customer care and specify Velo as the topic .