Following a request to change the class of a text box in a post in the Pano2VR General forum I give this a bit of thought and spoke with Christoph Gnome.
This is a skin project so posted here in the Skins forum.
We have come up with this project that uses the Go To URL action with a JavaScrip call that finds the text box, then removes the current class and then replaces it with a different class from the CSS stylesheet.
As an example in the attached project, in the skin, there is a text box with the ID Title.
The button with the ID Button Zhi Mang Xing has an action to change the class in the text box which is:
If you look at the code you will see that the first part finds the element Title which is one of the text boxes that need its class changed, then it removes any class it may have. The CSS Stylesheet I am using has five different classes, font1 to font 5. So I am removing all as I do not know which class the text box may have.
Code: Select all
You will see in the buttons that change the class you need a call for each text box.
For the Button, Button Zhi Mang Xing the URL is:
This will then remove any classes from the text boxes with the ID's: Title, Description, Author, Date, Copyright, Source.
Then it will set the class font1 to all the text boxes.
Just to add a bit more wow to this I add two more actions to the buttons that change the class, on mouse enter and leave they change the class for themselves and also using a colour logic block to invert the colour of the buttons.
I hope this gives you a bit more inspiration.