I have the following code that collapses/expands an html area on click. By default it’s closed…How can I set the default to either open or closed.
I have the following code that collapses/expands an html area on click. By default
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are two changes you should make in order to start with the list expanded. First, remove the line
$(".toggle_container").hide();. Second, add the class “active” to the line<div class="trigger"><a>Click here</a>so it becomes<div class="trigger active"><a>Click here</a>.