Hi onais,
If you want to display the selected node name in bootstrap modal popup header then place a span tag in the header section and give an id to the span and set the selected name to the span and open the modal popup.
Ex:
<div class="container">
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"><span id="selectedNode"></span></h4>
</div>
<div class="modal-body">
<p>Modal Body section</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$('.treeview a').on('click', function () {
$('[id*=selectedNode]').html($(this).text().trim());
$('[id*=myModal]').modal('show');
return false;
});
});
</script>