Global object classes

Let’s say I have ten pages and on every page I have seven buttons.

I modify the buttons on each page through code, I have to do this on every page or I can make some global function that I can just call on every page.

Image that I can do $w(”*button”).background.src = value;

That *button will grab all elements on a page and change the background image on them all in one liner.

If I put that in backend/elements.js it will run on every page before rendering pages, the elements.js is a standard script in version 4 of WIX code that will be executed to render elements dynamically.

If this was possible I could change colors and stuff dynamically so when one user gets logged in their screen is blue and they see their logo in the header and so on…

Dynamic Element Rendering on page basis or global.

This is actually already implemented…
" Selecting all elements of a specific type
If you want to select all the elements of a specific type, use the name of the element type without the hashtag, like this: 1 $w(“Button”) The name of the element type is the name of the element as it appears in the Wix Code API ."

it’s from this article: Velo: Working in the Code Panel | Help Center | Wix.com

there’s also some info on this here:

holy shit, I know what I must test today. do you have any possability to make the developer tools reappear on my sites on account andreas@pilgrimsbo,se

looking into it!

Hi Andreas,

In order for me to investigate why you cannot see the Developer Tools, can you please provide me an email address that you used to apply for beta?

andreas@pilgrimsbo.se