mercredi 19 mai 2021

How to create accordion using checkbox and radio buttons

I am creating a project in which we can see the assignment and download the assignment given by college.

I used the accordion method for that.... In which 5-6 subject are there and when you click on that subject it expands and shows the assignment,from that expanded view you can download the document or view it.....

I am also adding some buttons around it like "Download" "view" "Mark as favorite" for that assignment. Image to get idea about project

I have used the checkbox for expanding the accordions, now the main problem is that When I Click anywhere on that subject 'div' it expands, but i want that it should expand only when user click on that "plus" icon ( shown at a right side )

So that all the operations like "View Document","Download Document","Mark as favorite" work on the buttons that added on the right side...

I just want that when someone click on '+' icon it should expand (Not when someone click on whole div)

Check the whole code at Codepen




Aucun commentaire:

Enregistrer un commentaire