I have some jQuery code to change the button text when it is clicked. Originally (before clicking) the button is like this:
<button type="button"style="margin-top: 5px;" class="btn btn-danger btn-sm" id="image-remove-btn-4">
<i class="fa fa-trash"></i>
Remove Photo
</button>
This is my jQuery to change button name to Photo deleting...
$("#image-remove-btn-4").text("Photo deleting...");
The button text is changed successfully but the problem is that the FontAwesome icon is removed once the button is clicked. Are there any solutions for this?