data-parent Bootstrap [closed]

0

I'm having difficulty with data-parent to collapsate in the bootstrap

<div class="panel-group" id="paineis-sobre">
    <div class="panel panel-default">
        <div class="panel-heading" data-toggle="collapse" data-target="#item1">
            <h3 class="panel-title" data-parent="#paineis-sobre">Desde 2014</h3>
        </div>
        <div class="panel-body collapse in" id="item1">
            <p>Standing in the line to see the show tonight and there's a light on, heavy glow</p>
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading" data-toggle="collapse" data-target="#item2">
            <h3 class="panel-title" data-parent="#paineis-sobre">Desde 2014</h3>
        </div>
        <div class="panel-body collapse" id="item2">
            <p>Standing in the line to see the show tonight and there's a light on, heavy glow</p>
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading" data-toggle="collapse" data-target="#item3">
            <h3 class="panel-title" data-parent="#paineis-sobre">Desde 2014</h3>
        </div>
        <div class="panel-body collapse" id="item3">
            <p>Standing in the line to see the show tonight and there's a light on, heavy glow</p>
        </div>
    </div>
</div>

The divs do not collapse by clicking another in the same group.

    
asked by anonymous 06.09.2016 / 20:14

1 answer

0

In order for the data-parent attribute to work, you must place the same attribute in the div that contains the title, paragraph, or any other element you want to use

    
06.09.2016 / 20:19