Just a simple EDIT request. I want to modify the headers so that when I click on the "edit" icon, the header will change to a text field and the "edit" icon will switch to a "save" icon.
$('#editheader').click(function(e){
var category = $(this).closest("h3").text();
$( this ).replaceWith( "<a href=''> <i class='fa fa-save' aria-hidden='true' style='color:green'></i> </a>" );
$( this ).closest("h3").replaceWith( "<input value='" + category + "' >" );
e.preventDefault();
});
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<h3 class="panel-title"> Letters To Investors
<a href="#" id="editheader">
<i class="fa fa-pencil" aria-hidden="true" style="color:green"></i>
</a>
</h3>
<h3 class="panel-title"> Tax Documents
<a href="#" id="editheader">
<i class="fa fa-pencil" aria-hidden="true" style="color:green"></i>
</a>
</h3>