Collapse Component

Dear Sciaku Learner you are not logged in or not enrolled in this course.

Please Click on login or enroll now button.

If you have any query feel free to chat us!

Happy Coding! Happy Learning!

Lecture 102:- Collapse Component

In Bootstrap, the Collapse component allows you to show and hide content with a toggle button. It can be used to create accordions, dropdowns, or any other component where you want to hide and show content based on user interactions.

Here is an example of how to create a simple Collapse component in Bootstrap:

htmlCopy code

<button class="btn btn-primary" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">  Toggle Button </button> <div class="collapse" id="collapseExample">  <div class="card card-body">    This content will be shown or hidden when the toggle button is clicked.  </div> </div>

In this example, we have a button with the data-toggle and data-target attributes. The data-toggle attribute tells Bootstrap to use the Collapse component, while the data-target attribute specifies the ID of the content that should be shown or hidden.

We also have a div with the collapse class and an ID that matches the data-target attribute of the button. This div contains the content that will be shown or hidden when the toggle button is clicked.

The Collapse component can also be customized with various options and classes. For example, you can add the show class to the collapse div to make the content initially visible, or you can use the data-parent attribute to create an accordion-style Collapse component where only one item can be open at a time.

12. Bootstrap

Comments: 2

profile
@niteshguptav63
17-Nov-2024, 01:39 PM

I am not able to access videos from second class and further. I have already completed first class

profile
@niteshguptav63
16-Nov-2024, 10:56 AM

When will I get my course?

profile
@admin79
17-Nov-2024, 01:29 PM

Now, Your query was resolved.

Frequently Asked Questions (FAQs)

How do I register on Sciaku.com?
How can I enroll in a course on Sciaku.com?
Are there free courses available on Sciaku.com?
How do I purchase a paid course on Sciaku.com?
What payment methods are accepted on Sciaku.com?
How will I access the course content after purchasing a course?
How long do I have access to a purchased course on Sciaku.com?
How do I contact the admin for assistance or support?
Can I get a refund for a course I've purchased?
How does the admin grant access to a course after payment?