How to create an Accordion using CSS & Javascript

preview_player
Показать описание
Enroll My Course : Next Level CSS Animation and Hover Effects

Another Course : Build Complete Real World Responsive Websites from Scratch
------------------
Join Our Channel Membership And Get Source Code of My New Video's Everyday!
------------------

------------------
give proper credit if you repost this on other social media platform
------------------
Disclaimer video is for educational purpose only. Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favor of fair use
Рекомендации по теме
Комментарии
Автор

I have been watching tutorials for a week, now, at 3am, your video has finally made me finished the final step of my project, thanks a lot man, keep it up

lernist.oficial
Автор

Guys an easier method:
<Details>
<Summary>Heading</summary>
<P>Lorem</P>
</details>
Then style it

sfrstatus
Автор

This is amazing. thanks for this video especially for keeping them short and to the point and ofcourse covering all the parts

kieran
Автор

Using ForEach :

const accordion = ;
accordion.forEach(acc => {
acc.addEventListener('click', function(){

})
})

anasyoussi
Автор

You are reading my mind teacher, I was trying to do that too. too loud, thank you teacher

yvesyao
Автор

Thank yout so much, I made the code in another way but I used yout logic and now my web project is neer to be finished :D, muchas gracias hermano.

frankfarfan
Автор

Thank you so much for this. Please is there a way to remove the scroll bar, because mine is showing like a dot even when the tab is closed, so the user is able to scroll when the tab is closed from that dot scroll bar... is there a way to remove the scroll bar entirely?

opeyemiodebowale
Автор

Eu já entro dando like, seus vídeos são bons de mais

eder.santana_oficial
Автор

nice tutorial. Did you try height 100%? It seems the animation won't effect.

rayjenscode
Автор

Wow you are the best I have learned many styles of css because of you.Thanks alot 😃 😊

roger
Автор

Wow this was so easy and clear, I didn't expect that 😂

shahadomar
Автор

Coding & Piano, best match of all!

maxlong
Автор

It's nice but not dinamic. Because you fixed height when collapse. Scroll appear when content so long. I want more...

vietnguyenZ
Автор

Thank you, great and simple tutorial.

newcode
Автор

Great tutorial, to the point and it works...thank you..

codecleric
Автор

Great tutorial man, that really helped

karimaziz
Автор

thanks, i was in need of that.

Gratitude

emcasaempreendimentosimobi
Автор

I set alarm to see the video first but failed 😁

Nice

snssatyabhagavan
Автор

hey did anyone have any issues with their code? My toggle class doesn't work, everything seems to be fine with the code, but toggle isn't enabled. Any recomms?

Dreamingofrainbows
Автор

I think there's a logic error (in my opinion) in the code running
After the content box is opened, it should only close when the content title is clicked, but it also closes when the content text is clicked.
In other words, I want the opening and closing operations to be done only when the content title is clicked. I think this is what makes sense.
How can I fix this problem.

NejdetACAR