Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

on button click show collapse div jquery

#wrapper {
  background: #ccc;
  overflow: hidden;
  transition: max-height 300ms;
  max-height: 0; /* <---hide by default */
}
#wrapper.open {
  max-height: 100px; /* <---when open, allow content to expand to take up as much height as it needs, up to e.g. 100px */
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #button #click #show #collapse #div #jquery
ADD COMMENT
Topic
Name
5+9 =