JQuery How To Create An Accordion Check By Class ( Video Tutorial )
Words
262
Reading
2 min
Listen
Play
9y
What Will I Learn?
I will learn how to create an accordion and check by class if it has this class will appear else will disapear.
- I added some heading with some CSS proprieties .
- I used the toggle class to add and remove the active class
- I applied after check if the heading has the active class the slide toggle function with speed 500 it means 1/2 second .
Requirements
- Basic knowledge of JavaScript language .
- Knowledge of JQuery .
- Has the min jquery file .
- Has an editor text .
Difficulty
- Basic
Description
In this video I will show you how to create an accordion , firstly I created 5 headings and 5 divs I added for them some CSS proprieties to be with different colors I kept the first div open after selection of div I set the display CSS propriety to block and if I click on a heading I will add to it the class active and if I click again I will remove it and I will check if this div has this class so do the slide toggle between up and down and the other divs slide up it will disapear .
Video Tutorial
Curriculum
- JQuery How To Calculate The Textarea Remaining Characters by Keyup Function ( Video Tutorial )
- JQuery How To Create An Infinity Animate Function Recursive Method ( Video Tutorial )
- JQuery How To Create Counter Down by SetInterval And ParseInt functions ( Video Tutorial )
Posted on Utopian.io - Rewarding Open Source Contributors