Position Element on load

Hey all. I hope this wasn’t already answered.

I have a bunch of buttons and when the user hovers them some text appears on the right hand side, relating to that button. With this code if curious:
export function button1_mouseIn(event) {
// This function was added from the Properties & Events panel. To learn more, visit Velo: Working with the Properties & Events Panel | Help Center | Wix.com
// Add your code for this event here:
$w( “#text59” ).show();
}
export function button1_mouseOut(event) {
// This function was added from the Properties & Events panel. To learn more, visit Velo: Working with the Properties & Events Panel | Help Center | Wix.com
// Add your code for this event here:
$w( “#text59” ).hide();
}

I have all the text boxes under each other (on the edit page) just in case I need to edit one. Of course if you Publish that, it will show them like that.

On the live site, when I hover the buttons, I would like them all to be stacked in the same spot. Is there code I can add that when the page loads all the text boxes go on top of each other? Like on load position element #text59 at x:327y:1143. And would do for every text element…

Thanks for the assist!

Moving elements by y-, or x-axis is not possible, but feel free to vote for this function here…

Long time ago, i already opened a request for such a feature, but since there were not enough people who voted for this feature, it is still not available in Wix/Velo. It’s really a pitty, that there isn’t given such a feature in VELO/WIX. :sleepy::sleepy::sleepy::sleepy::sleepy::sleepy::sleepy::sleepy::sleepy::sleepy::sleepy::sleepy::sleepy::sleepy::sleepy::sleepy::sleepy::sleepy::sleepy::sleepy:

Here the link to the wichlist…
https://www.wix.com/velo/wishlist?page=3

And here the link to the mentioned voting…
https://www.wix.com/velo/requested-feature/moving-elements-on-page

1 Like

That is really unfortunate. Its like going in time before style sheets and basic HTML. I will vote, for sure, and deal with the “ass” pain of clicking moving everything to edit one item. Blah.

I am almost thinking if a dataset would work.

Putting the extra text in a database, and then when i hover (or click the button) it loads onto the screen in a container box?

Check this!
https://www.wix.com/velo/forum/community-discussion/lightbox-api

It could be similar to your needs.

This might be…thanks! I will keep you posted.

Now to get the lighbox not to go full screen. I prefer it so you can still see the main page behind it.

Use the Wix-UI in your Wix-Editor to customize the color, opacity and size of your LIGHTBOX.

It doesn’t seem to have size…Here is the mock up size.
https://amber741.wixsite.com/turtlereefclub

This is all you really get.

Basically I want the white section only in the About page when you click on the button under the title " NEARBY ATTRACTIONS AND SHOPPING"
or if not only that section, the whole thing to be smaller and “pop up” when you click the button. Hmm.

Take also a look onto this post here…
https://www.wix.com/velo/forum/community-discussion/solved-open-a-lightbox-when-chatbox-is-minimized

Could be interessting for you.

Thank you, I will take a look tomorrow. Your the best!

Looked into it, but not using a chat box.

Got it working. I had to change it from video to a colour to make it 0%. All good!

What you can do is instead of making miltiple textfields, just use 1.
When hovering over a button do the following:
On mouse in:
Show the textfield.
$w(“#youTextfield”).text =“text for that button”

On mouse out
hide the text field.
Do this for all buttons.
This way you can easy change the text if needed

Thank you. I will try that for next time. I did end up using light boxes.

Thank you all for all your help.