Reputation: 26919
Currently I am using accordion like this and I have that glyphicon arrows I can click on to expand/collapse it. : http://www.bootply.com/1fDNAjGFrJ
$('[data-toggle="collapse"]').click(function() {
$(this).children(".glyphicon").toggleClass("glyphicon-chevron-up glyphicon-chevron-down");
});
<div class="container">
<div class="panel-group" id="accordionMessagesSetup">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMessagesSetup" href="#collapseMessagesSetup">
<span class="glyphicon glyphicon-chevron-up"></span>
Message Setup
</a>
</h4>
</div>
<div id="collapseMessagesSetup" class="panel-collapse collapse in">
<div>
Actual Content goes here
</div>
</div>
</div>
</div>
</div>
The clickable area currently is just that icon. How can expand it to make the whole panel-title
section clickable ?
Upvotes: 1
Views: 1777
Reputation: 15739
Make the anchor for panel title to have a block
display.
For instance,
.panel-title a {
display: block;
}
Hope this helps.
Upvotes: 1
Reputation: 1813
Just a simple css case, let a
be a block
and use padding
to fill title:
.accordion-toggle {
display: block;
padding: 10px 15px;
}
.panel-heading {
padding: 0;
}
Upvotes: 2
Reputation: 4523
Just add this to your css
.accordion-toggle{
display: block;
}
Upvotes: 1