Check out this snippet of code:
<div class="panel panel-default">
<div class="panel-heading clearfix" role="tab" id="heading-details" data-toggle="collapse" data-target="#details" data-parent="#panel-group" href="#details">
<h4 class="panel-title pull-left">My panel title</h4>
<a class="btn btn-primary btn-sm pull-right" asp-action="Action" data-toggle="off">
<span class="glyphicon glyphicon-pencil"></span>
</a>
</div>
<div id="details" class="panel-collapse collapse" role="tabpanel">
<div class="panel-body">
@Html.Partial("_DetailsPartial", Model)
</div>
</div>
</div>
Problem Statement:
Currently, the panel body expands/collapses when clicking on a button link. However, I want to disable this behavior and prevent toggling of the panel body upon button click.
How can I deactivate the data-toggle attribute on the button?
Your assistance is greatly appreciated.