First, I'm a newbie and have very little JS experience. I've been reading threads about this but am unable to get it working.
I have two buttons in the title section of an accordion and they are encased in a container. When one of the buttons is clicked, it toggles the accordion. What I really want is if the user clicks one of the buttons the accordion expands if not expanded, but not collapse if it is expanded.
I've seen (and tried to implement) solutions with JS and style classes but I'm missing something.
I have successfully implemented an accordion that starts expanded and won't collapse when clicked.
Hi @Jeff Kest,
Does your solution have to be in JS? Inside the OutSystems UI there are a lot of ready-made actions for accordions which, if I understood your problem correctly, I think might be of help for you and are worth at least checking out. You might also need a variable to hold the info whether the accordion is expanded (or data is shown).
Kind Regards,
@JenniS,
Thank You! That's just what I needed.
Hi @Jeff Kest ,You have 2 buttons first for expanding and the second for fide it back.And first functionality you have completed if data is hidden and click on the first button it will expand the data.But your second scenario is not clear could you please explain more clearly?Also if you can share your OML I will check and verify the functionality.Regards,
Hi jeff,Refer this Link, May be it will help you.
hi @Jeff Kest ,
hope you are well
If am not wrong you want that when user clicks on button the accordion should expand i tried it
you need to give name to the accordion
then on the button on click you have to use accordionItemExpand login in outsystems simply searching on top of the right side
in you action
then use like this
use accordion name.id
like i used accordion name=second + .id
thanks .