data-Parent Bootstrap

Asked

Viewed 52 times

0

I’m having difficulties with data-Parent to collar in 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 on another from the same group.

1 answer

0


In order for the data-Rent attribute to work, it must be placed in the div containing the title, paragraph, or any other element you want to use

Browser other questions tagged

You are not signed in. Login or sign up in order to post.