Bootstrap Collapse:How to deactivate other buttons?

Multi tool use
Bootstrap Collapse:How to deactivate other buttons?
I need help in using Bootstrap collapse.
I created 3 buttons which are collapsing. The thing, that in my case it is only logical if only one button is collapsed.
So I want to deactivate other buttons when I'm clicking on a button.
Is there maybe any method to do this?
Thank you very much.
some example text
some text
</div>
</div>
random text
</div>
random text again
</div>
</div>
</div>
This is a simplified example of my code.
I am not getting any errors.But if I'm activatíng two or more buttons, the texts or whatever are not getting their right positions as I am using responsive columns.
– Artur Y
Jul 3 at 7:51
I am going to share code in few seconds.
– Artur Y
Jul 3 at 7:51
what version of bootstrap do you use
– לבני מלכה
Jul 3 at 8:03
I am using version 4.0.
– Artur Y
Jul 3 at 8:05
2 Answers
2
You can write a jquery function for it. Get your button elements and toggle their disabled state when one of them is clicked. You should even find quite a lot of ready to go solutions for it if you search "bootstrap collapse expand one at the time"
Yeah. Thank you very much. I guess it is the right way. I thought maybe there are other ways to do that.
– Artur Y
Jul 3 at 9:51
Ok, I guess I'm going to use acordions.
First, I didn't like them, but they are looking a way better on small devices.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Share some code or error you are getting.
– Empty Brain
Jul 3 at 7:47