Good morning, Jeremy,
I’d like to add some “accordion” elements to my website pages. The manual explains how to do it, but it’s not a very straightforward and simple procedure. Do you think Xway will provide a function, action, element, or something similar in the near future that can easily achieve this effect?
Thank you.
Umberto
Buongiorno Jeremy
vorrei inserire nelle pagine del mio sito alcuni elementi “accordion”. Il manuale spiega come fare ma non è una procedura così immediata e semplice. Pensi che in un prossimo futuro sarà prevista in Xway una funzione, un’azione, un elemento o qualcosa di simile per poter, con facilità, ottenere questo effetto?
Ti ringrazio
Umberto
Are you looking for something like a details element?
There is some information here, and we do intend to support this in a future version of Xway, but it’s not something we’re currently working on. For now, you’d need to add this via a markup item.
Alternatively, you can use target styles to create collapsible sections. This is mentioned in the User Guide (as you’ve seen), and isn’t so difficult to implement, although perhaps the guide
could make it clearer that there are two different methods involved:
Target style changing None display to Normal
Target style changing Maximum Height from zero
The first method displays the hidden box instantaneously, while the second method allows for a transition.
Here is a sample document that shows both methods.
There are three pages. On the first page there are two collapsible boxes that are shown and hidden using a target style to change Display from None to Normal. On the second and third pages the collapsible boxes are shown and hidden using a target style to change Maximum Height from zero to 300px (or a larger value if needed). On these pages there is a 1-second transition during which the maximum height is increased, but the transition is added in slightly different places, so on the second max-height page the boxes expand gradually but collapse immediately, which might be less distracting - try it in Xway’s Web view and see which you prefer.