Binquan Wang Binquan Wang - 10 months ago 57
Javascript Question

why my collapse default is not hidden

render() {
var item =
return (
<li key={} className="faq-item-li" id={"faq-item-li-" + item.counter}>
<h4 data-toggle="collapse" data-target={"#answer"+} >{item.title}</h4>
<div id={"answer"+} class="collapse">{item.description}</div>

part default is always shown. I want this part to be hidden first

Answer Source

Try replacing class='collapse' by className='collapse'